15 July 2012

A (little more) Powerful Google Analytics Code

by manos_parzakonis

I presume you are using various tools to measure the impact of your posts and the performance of your website. It would be a safe guess that Google Analytics is the predicament tool (especially if using blogspots).

The standard code is a bit restraining however. In that case Cardinal Path has put together more tracking features in a modified Google Analytic Tracking Code (GATC). While there is no need to go into the details of the code itself by examining the basic script the advantages are obvious.

As it’s obvious the GAS script enables outbound links’ tracking, downloads, video interactions (YouTube and Vimeo) provided you are embedding them using iframes. Among other it use event tracking to let you know of the scrolling visitors use to navigate your websiteYou can get the details in the github repository of Google Analytics on Steroids (GAS). Essentially you need to download the gas.js file and upload it to your website (so you are the one hosting it in order to be safe) and then replace the GATC you already have in place with the above script.

You can ignore the

_gas.push(['_setDomainName', '.mydomain.com']);

if using one domain tracking.

Also make sure that if you are already implemented event tracking  for any of the categories listed above that you are keeping the same Category,Action,Label convention so you don’t break your statistics when you shift to this code. You can manipulate this via the opts parameter in every _qas.push

_gas.push(['_gasTrackDownloads', 'Downloads');

Now you are ready! Have fun :)

tags: code - google analytics - modification - tracking - web measurement