O'Reilly logo

HTML5 Boilerplate Web Development by Divya Manian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 webmaster ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required