This function pushes rankings to a Google Analytics custom variable when someone comes to a given page from Google
JavaScript
Latest commit c1ccf84 Mar 11, 2012 @ipullrank Updated 3/11/2012 to change the scope in GA, check for any
Google property (not just google.com) and return ranking
for dynamic messaging applications.
Permalink
Failed to load latest commit information.
README Update README Oct 24, 2011
rankings-push.js Updated 3/11/2012 to change the scope in GA, check for any Mar 11, 2012

README

This is a JavaScript function by Michael King that pulls rankings from the parameters on the Google SERPs and pushes them to Google Analytics as a custom variable called Rankings.

For more information on this and its application see John Doherty's post on SEOmoz:
http://www.seomoz.org/blog/gettings-rankings-into-ga-using-custom-variables