HTML and CSS Reference
In-Depth Information
Augmenting Google Analytics
Google Analytics can track several kinds of data and here are some easy, obvious
augments you can make to your Analytics data.
Adding more tracking settings
Google Analytics gives you a number of optional settings to track, which you need
not use the .push() method on; instead you can directly append to the initial array.
Instead of the following:
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X'']);
_gaq.push(['_trackPageview']);
You can do the following:
var _gaq = [['_setAccount',
'UA-XXXXX-X'],['_trackPageview']];
Anonymize IP addresses
In some countries, no personal data may be transferred outside jurisdictions that do
not have similarly strict laws (that is, from Germany to outside the EU). Thus, a web-
master using the Google Analytics script may have to ensure that no personal (track-
able) data is transferred to the U.S. You can do that with the _gat.anonymizeIp
option. In use it looks like the following:
var _gaq = [['_setAccount', 'UA-XXXXX-X'],
['_gat._anonymizeIp'], ['_trackPageview']];
Search WWH ::




Custom Search