Tracking Google Ranking Position From Parameter in Refferal URL

Posted by on Jun 4, 2010 in Google, SEO, Statistics

Over the last several months I’ve become somewhat obsessed with collecting SEO related data in an automated fashion. I’ve taught myself some PHP to accomplish what I want to achieve, and am actively working on several scripts that will gather and analyze all kinds of data. One things I wanted to do was track over time the change in rankings for keywords I was already receiving traffic for so I could measure what effect a change in SERP rank position would have on the amount of traffic I received for that keyword, and get a better idea as a whole what effect ranking positions have on traffic levels. I wanted to go beyond just regular rank checkers like SEO Book’s RankChecker and make the process entirely automated. My plan was that when a visitor came to one of my sites from a search engine a script would automatically execute that would check the rank position of my website for the keyword they used to come to my site, or at least add the keyword to a queue. I assumed that I would have to scrape this information from Google because I knew they didn’t offer an API anymore and from my initial research I couldn’t find the information in the referral URL from Google.

I was very excited to find out, however, that Google actually started to pass along this information in their referral URL parameters a little over a year ago. The URL format they said they would start using in their post announcing the change looks like this:

so each of the URL parameters are:


The “cd” parameter is the one that shows the rank position of the link the visitor used to get to your site.

This information is very useful not only because it saves time in having to check rankings yourself, but it actually tells you the exact position that the given visitor saw. One drawback to rank checkers or just manually checking a rank is that you can never be completely sure if the rank you get reported back is what actual visitors to your site experienced because different data centers could be presenting different results and with Google personalized search any given searcher’s SERPs could look different as well. So not only is the process simplified by getting this piece of information from the refferer URL, but the data you are getting is much more accurate than from scraping or manually checking.

Alas, it appears that Google doesn’t provide this information for every visitor. Shortly after Google’s post on the subject Omniture reported that this data was only shown for US searches and was currently impacting only about 10% of all searches. I think now, a year later, Google may be showing it more often but from my experience it is still a minority of searches.

Once I start to look closer to the data I’m receiving I’ll be posting more exact numbers on this along with other interesting data I’ve been collecting.