Event Tracking with Google Analytics

 

Previously we’ve showed how we’re starting to make use of A/B testing to measure the proposed improvements to our site. We’ve also started using other more advanced features of Google Analytics on our site.

The problem comes from some of our designs which use JavaScript to create advanced designs. The homepage for example has a feature area showing four key news stories, events or promotions but Google Analytics only registers the page loading – previously we had no way to determine which slides were being looked at.

The solution is event tracking. With this, GA can record activity other than page views. In this example we register as an event an interaction with the feature area. These are logged as “Switch 1/2/3/4” when the corresponding slide is displayed. Loading the default slide isn’t recorded – we can get that figure from the number of page views – but clicking the thumbnail link does trigger the event.

In many ways the results are unsurprising:

Event Action Total Events Unique Events
Switch: 1 606 491
Switch: 2 593 466
Switch: 3 454 359
Switch: 4 311 255

So the further left the more often the content is viewed. We also record the title of the tab for easy reference – it’s hard to remember what story was in each position on a particular day:

Event Label Total Events Unique Events
University of the Year 2011 592 465
Jennifer Saunders in Conversation 453 358
Postgraduate Study for 2012 311 255
Scholarships for 2012 218 178
Scholarshipsfor 2012 147 129
Graduation ceremonies today 135 101
Awards ceremonies will be held as scheduled 104 87

“Scholarships for 2012” is doubled up – there’s still some debugging to do extracting the slide labels from the H3 tag but early results are very interesting.

This type of event tracking applies to a couple of different designs based on our feature area JavaScript so we can start to measure the success of slides on the About page – Campus and Location (position #5) is second most popular link.

As will any type of statistics, the hard part is in analysing what they mean but already this has proved to be a useful additional metric we can use when reviewing our site.

 

3 thoughts on “Event Tracking with Google Analytics

  1. Jamie

    It’s great to see the inner workings of something that I use every day. Being on the web systems development degree I’m glad I came across the webservices blog!

  2. Mike Nolan Post author

    Glad you find it interesting – if you’ve got any questions please feel free to send them over and we’ll try to answer them in a blog post!

Comments are closed.