When using Google Analytics and using the newer ga.js file, is the __utm.gif file needed in your root directory of your web site?
I do see a call being made from my browswer to the file on google-analytics.com (http://www.google-analytics.com/__utm.gif?...), but in the past I was told that it needed to exist in the root of the site.
Does this still hold true?
Could you please provide a reference?
You are required to add _utm.gif to your server root if you are also sending a copy of the google analytics data to your local webserver. It gives you the option of keep the data much longer since Google is only keeping 25 months of data for free account. Google also doesn't share the raw data, the only way to get the raw data is also sending it to your local webserver log. For it to work, you need to add this line below to the tracking code:
_gaq.push(['_setLocalRemoteServerMode']);
For more detailed discussion, please refer to the book by Clifton, Brian (2012-03-30). Advanced Web Metrics with Google Analytics (Kindle Locations 4459-4460). John Wiley and Sons.
I use the older urchin.js tracking mechansim and there are no requirements to host anything locally although you can put the .js file on your server for speed. There are four images that get requested to provide the tracking;
__utma
,__utmb
,__utmc
and__utmz
which correspond to they cookies recorded of the same name.From Google; When you first begin implementing tracking in Google Analytics website, you need to install the tracking code on your website pages. The generic tracking code snippet consists of two parts: a script tag that references the ga.js tracking code, and another script that executes the tracking code.
If you are using the new version of the tracking code (
ga.js
), the only thing you need to do is include this snippet of JavaScript:This would imply that there are no requirements for you to host any
__utm.gif
file on your server (I'm not sure how this would even work for analytics anyway, as the whole point is for the client's browsers to make requests to Google's servers).