Chapter 14. Hacking Google Analytics

What fun would Google Analytics be without a few tricks of the trade? Even though the default Google Analytics setup makes it a great tool to help web-site owners everywhere obtain highly insightful information, there are quite a number of helpful tips, tricks, and customizations that can make all the difference for you. We like to call these "hacks," and in this chapter you're going to find a whole lot of 'em. We've made it so that you don't have to be a computer science major or an MIT doctoral candidate in order to apply some of these hacks—or, at least, be able to tell a webmaster or IT techie how to do them.

Hopefully, you have free rein to make code modifications on your site, but please keep in mind that not every off-the-shelf or turnkey solution will allow you to edit source code and make customizations. Please work with your vendor to implement changes to the Google Analytics Tracking Code.

We have small hacks, big hacks, simple hacks, and a few complex hacks within the following pages. Which ones will be useful for you?

A Review of Subdomain/Cross-Domain Tracking

Some of you may be coming here because we recommended that you should from Chapter 6 ("E-commerce Concepts and Methods"). As we mentioned there, you don't necessarily need to have an e-commerce storefront for tracking your subdomain(s) or your multiple domain(s). Perhaps you have a blog on a subdomain from your primary domain (blog.yoursite.com), or maybe you have a sister web ...

Get Google Analytics™ Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.