Over the last few weeks I have been going through the nitty gritty of the actual Javascript that is used by Google Analytics. And what I have found regarding how the Google Analytics Cookies work has shocked me. I cannot believe there hasn’t been more of an uproar about it on the Internet. When I was searching there was a few mentions of it here and there, but this issue should have been voiced louder.
The __UTMZ Cookie
According Google themselves:
When visitors reach your site via a search engine result, a direct link, or an ad that links to your page, Google Analytics stores the type of referral information in a cookie. The parameters in the cookie value string are parsed and sent in the GIF Request (in the utmcc variable). The expiration date for the cookie is set as 6 months into the future. This cookie gets updated with each subsequent page view to your site; thus it is used to determine visitor navigation within your site.
So what this means whatever method was used by that visitor to access your website for the very first time is how it is recorded for each and every visit after that as long as the cookie lasts on the visitors computer.
So is That a Good Thing?
Well it all depends. Where this cookie comes to the fore is when someone is doing research, say “digital cameras” and then spends the next few hours researching. Whilst they might not convert on the first visit, they might come back towards the end of the research and buy based on that original search. Rightly then, that keyword gets the credit for the conversion, no matter how the visitor accessed the website later on down the track.
However, my problem with this particular default setting is that the cookie lasts for 6 months. Is that really a reasonable amount of time to expect someone to make a buying decision. Sure there are extreme cases were this kind of buying cycle exists, but I am positive it is not the norm. And I am also going to make the assumption that not many search marketers are aware of this themselves - or they know and use it to bias their monthly reports towards making them look like their campaigns better than they really are.
How to Modify the Cookie
Thankfully, all is not lost, as those in the know can now modify the standard Google Analytics javascript to modify the length the cookie hangs around for.
The function that you need to modify is:
pageTracker._setCookieTimeout("");
The parameter to send to this function is really dependent on your own website’s needs and objectives. Cookies are stored based on the number of seconds. So if you wanted the cookie to last a day, the parameter should be 86400 or if you want it to last a month, try 2629743.
Conclusion
By adding this little hack into your Google Analytics code, you will be left with a much more accurate representation of your website’s traffic patterns, completely tailored to your website.
If you have successfully done this with your installation, leave a comment below and share what you do to improve the accuracy of your website’s data.
{ 5 trackbacks }
{ 0 comments… add one now }