Parsing the Google referral string in a post (not provided) world

September 29, 2013

Note: As March 2016 Google is no longer passing this information in the referral string.

As of September 2013 Google prevented site owners from seeing all organic referring keyword data in the referral string.

However there is still plenty of data to be gleaned from the string. For quick testing the HttpFox Firefox plugin is excellent. Systematically capturing the data is easily done in any web analytics tool or server log parser using simple Regex.

It’s important to note that this data appears not to be passed from mobile searches which may somewhat skew any conclusions.

1) The rank of the link that the user clicked

To understand the rank of the result the user clicked to arrive at your site, look at the ‘cd’ key / value pair. e.g.

`http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CC8QFjAA&url=http%3A%2F%2Fwww.ebay.co.uk%2F&ei=oe9GUtLDMJPT7AbkZw&usg=AFQjCNGEltn-KekW3pKDE9fUDb2NKpKbWw&sig2=BecHxquQThrLWIGjk9VEMA`
cd=1 indicates the clicked listing was in first place, cd=3 third place etc.

It does however get more complex when authority links and universal search are included on the Search Engine Result Page (‘SERP’), which will happen in most cases.

In this case the universal search results are counted in the SERP and must be considered e.g. in this case it’s possible to have up to a cd value of 16 on page 1.

[![CD variable by SERP result](http://qforquery.com/wp-content/uploads/2013/09/ebay-screenshot-cd-var-final.png)](http://qforquery.com/wp-content/uploads/2013/09/ebay-screenshot-cd-var-final.png)
Orange numbers represent the ‘cd’ value

2) The type of link clicked (search, news, image etc)

The ‘ved’ parameter indicates what type of result has referred a visitor to your site.

`http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CC8QFjAA&url=http%3A%2F%2Fwww.ebay.co.uk%2F&ei=oe9GUtLDMJPT7AbkZw&usg=AFQjCNGEltn-KekW3pKDE9fUDb2NKpKbWw&sig2=BecHxquQThrLWIGjk9VEMA`
This has been well documented by Tim Resnik in this [excellent post on moz.com](http://moz.com/blog/decoding-googles-referral-string-or-how-i-survived-secure-search "Moz article on Google Search Referral strings. Opens a new window").

Here’s a marginally more verbose version of Tim’s table. Note these are substrings of the total value;

VED ValueThis means
QFjA normal organic search result
QqQIwA news OneBox link (e.g. 11, 12 & 13 above)
QpwIA news OneBox image (e.g. 11 above)
Q9QEwVideo OneBox link
Qtw1wVideo OneBox image
QjBAn authority link (e.g. #2 – 4 on the screenshot)
BEPwdKnowledge graph image
BEP4dA secondary Knowledge Graph image

3) The local version of Google searched by the user

This is straightforward, you can clearly see the Top Level Domain (TLD) of the Google search that referred the visitor. In this example you can see Google UK;

`http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CC8QFjAA&url=http%3A%2F%2Fwww.ebay.co.uk%2F&ei=oe9GUtLDMJPT7AbkZw&usg=AFQjCNGEltn-KekW3pKDE9fUDb2NKpKbWw&sig2=BecHxquQThrLWIGjk9VEMA`
To simulate this quickly, try the [Search Latte](http://searchlatte.com/ "My word, this is a fine SEO tool") international search tool.

4) The landing page URL

The ‘url’ variable is another nice easy one to decipher;

`http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CC8QFjAA&url=http%3A%2F%2Fwww.ebay.co.uk%2F&ei=oe9GUtLDMJPT7AbkZw&usg=AFQjCNGEltn-KekW3pKDE9fUDb2NKpKbWw&sig2=BecHxquQThrLWIGjk9VEMA`
Note the address itself is character encoded hence; `http%3A%2F%2` represents `http://`.

5) Is the user logged in to Google?

Finally the ‘sig2’ parameter only appears whe a users is logged in to Google, therefore you can determine the proportion of users arriving at your site authenticated with Google.

`http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CC8QFjAA&url=http%3A%2F%2Fwww.ebay.co.uk%2F&ei=oe9GUtLDMJPT7AbkZw&usg=AFQjCNGEltn-KekW3pKDE9fUDb2NKpKbWw&sig2=BecHxquQThrLWIGjk9VEMA`
### What does any of this mean?

Obviously the loss of the referring keyword is a blow to the accuracy of any SEO reporting. But the above will at least allow site owners to answer questions like;

  • Does traffic from different ranks convert at different rates?
  • Does traffic from different types of search result behave differently?
  • What proportion of visitors arrive at your site from different local versions of Google?

Chris Reynolds is a Bay Area Product Manager with 15 years of international experience in SEO, digital marketing, UX, analytics and team management.

© 2023 Chris Reynolds