Pages

Monday 21 November 2011

Tracking Google Secure Search in SiteCatalyst

This week, Google announced that they plan to start migrating their users who are logged into their Google accounts over to using the Google secure site (https://www.google.com). Their intention is to try to make searching more secure for their users. Here is Google’s announcement of the change: Making Search More Secure

That sounds like a positive change, but how does this effect the analytics community? Well, one of the features of using the Google secure search site, is that Google removes the keyword value that was searched for from the referring URL (the q= value). In other words, if you do a search from the Google secure site, the keywords you searched will not be passed along in the referrer information. The referrer string is what your analytics vendor uses to determine what keywords led visitors to your site from Google.

Here is an example of the referrer string in action. I did a search on the standard non-secure Google site for the term “keystone solutions”.


Clicking the first result, we are taken to the Keystone Solutions site. Checking the Omniture debugger, we can see that the value of the keywords we sarched for appear in the referring URL string as the q= value.

Now lets go to the Google secure site and perform that same search




Again, I click the first result and arrive at the Keystone Solutions site. Checking the debugger this time gives us a very different referring URL value. Here you can see that the q= parameter that held the value of the searched keywords on the non secure site is now blank. Our searched keywords have been removed.




So what direct effect will this have on our reporting? Well, if you track search keyword volume you will begin to see a decline in the keywords that brought traffic to your site. There is no way to capture that missing keyword value. What I would like to see is in the keywords report some indication that a search was still made, but the visitor did it using the Google secure search page, so I can still have an accurate track of my overall searched keyword volume. What can we do about this?

What I have here is a little chunk of code that will inject the value of “Google Secure Search” to the referring URL keyword value (q=) when the visitor came from the Google secure search site, so I can see how many of the searches that were performed, that led visitors to my site, were done using the secure search.

?1 var kr=document.referrer,kk=s.getQueryParam("q","",kr),ks=s.getQueryParam("esrc","",kr);if(kr.indexOf("www.google.com")&&!kk&&ks=="s"){var ksr=kr.split("q="),kq="q=Google%20Secure%20Search";s.referrer=ksr[0]+kq+ksr[1]};
All the code needs to work is the getQueryParam (which just about everybody should be using). Just place that line in the s_code file near the end of the s_doPlugins section and thats it. For all other search engines and for non-secure Google search, everything will work as it always has, but when you do a search using the Google secure site, then you will get the injected “Google Secure Search” value in the keyword variable.

Here is an example of it working in action:


No comments:

Post a Comment