Just to let you know that I have finally gotten round to updating the combined tracking script hack I had for urchin.js to the new ga.js. If you know what I am referring to, the new script is listed here: http://www.advanced-web-metrics.com/blog/ga-scripts/

Essentially the combined tracking script is a modification of the GATC so that it automatically tracks:

  • outbound links - Automatically
  • file downloads - Automatically
  • mailto links - Automatically

Therefore, instead of having to manually modify such links by adding an onClick event handler to your ‘a’ tags, this script will do it all for you.

Why is this necessary?

Outbound links (links to other websites from yours), file downloads (e.g. PDFs, exe, xls etc.) and mailto links (links to an email address) can be important indicators as to whether your site is engaging with visitors. If so, you will certainly want to track these and potentially define them as goals in your Google Analytics reports.

Normally you do this by creating a virtual pageview. However if you have hundreds/thousands of these, or even just a few dozen that constantly change, manually tagging them is an administrative nightmare.

This script uses the properties of the browser (Document Object Model, or DOM for short), to capture links that are non-standard pageviews and automatically create the event handler for you.

The result is that your outbound links, file downloads and mailto links are tracked for you and are always up to date. The default virutal locations for these in your Google Analytics reports are:

/ext/, /downloads/, /mailto/

respectively, though of course you can change these as you wish. Typical you will wish to view these in your Content > Top Content report as shown below:

Related posts:

Are you using this or creating your own hacks for Google Analytics? Please post your comments and share your thoughts here.

1 Star2 Stars3 Stars4 Stars5 Stars (8 votes, average: 3.63 out of 5)
Loading ... Loading ...
Email This Post Email This Post     Print This Post Print This Post