Google Analytics Event Tracking

Background and Insutry Analysis:  Google Analytics (GA) rolled out event tracking in 2007, but many website owners still aren’t taking full advantage of this powerful feature.  In fact, many website owners don’t know what it is – no mystery since it takes a bite more javascript coding than just adding the GA tracking code into a site template.

These events can be thought of as actions on a site that are more granular than the simple viewing of a page.  This can include the number of plays or completions of videos, downloads of PDFs, more accurately measuring time on site and measuring how far down a page someone scrolls on a long page.

Let’s take a closer look at these different actions and see how they might be implemented:

Tracking videos and PDFs

In our space we make efforts to educate physicians on clinical trial data and mechanisms of action, which often gets done with the aid of videos and PDFs – this makes for a perfect opportunity to track engagement.  To do this, we use a javascript command called an onclick to let GA know when someone has clicked on a video play button or link to download a PDF.  For those who don’t have GA installed, these things can also be measured with an ad server such as Doubleclick.

Time on Site

Time on site is used extensively as an engagement metric.  However, the way that time on site is measured out of the box in GA, two page views are necessary (single page visits count as zero time on site), and time spent on the final page of the visit isn’t factored in.  If the site content and architecture is such where people can find what they’re looking for on a single page time on site would be driven down.  Again, there is a javascript code snippet to help.  This one acts as a “heartbeat,” where every 10 seconds, it lets Google Analytics know that the user is still there.  So if a visitor came to a page on your site, spent 5 minutes reading a page, but then left, GA would be informed that the user spent 5 minutes on the page, whereas out of the box, it would count as zero time on site.  There are come caveats to using a “heartbeat,” so we recommend a discussion with our IQ Rx experts before implementation.

Page Scrolls

Landing pages are sometimes designed with a good amount of content on a single page with few additional pages to navigate to.  This is often the case for landing pages that are customized for a particular ad campaign.  In these cases, one would want to see which visitors are reading the entire page, and which ones are leaving without scrolling down (out of the box, GA will treat these two visitors equally).  To do this, we’ll also use javascript to inform GA of an event (page scroll in this case) occuring.  Unlike the two previous methods, this one uses a javascript library called jQuery. 

Recommendations: Event tracking takes some time to coordinate and implement.  It also requires the newer GA code (asyncronous) version.  However, it allows for much more granular tracking and a better understanding of how visitors are behaving (they may actually be engaging more than you think).  We recommend that anyone who is interested in GA Event Tracking reach out to their account lead to coordinate a discussion with our IQ Rx experts.

If you are using other site analytics tools such as Omniture or WebTrends, contact us to discuss how we may be able apply the same approach.