Why use event tracking in Google Analytics?
The data you capture and the way in which it appears within Google Analytics is completely customisable by you, making it very flexible and adaptive to your specific implementation requirements.
Event Tracking works through passing four variables to Google Analytics:
Category, Action, Label and Value
There is a fifth, optional field that specifies whether this interaction should be considered in bounce rate calculations.
Basic syntax for event tracking
In it’s simplest form, the code is structured like this:
_trackEvent(category, action, opt_label, opt_value, opt_noninteraction)
This post is just a download of ideas I’ve had for interesting/useful things to track with event tracking in Google Analytics.
Form tracking with Google Analytics:
I could (and most likely will soon) write a separate blog post just on form tracking. It’s one thing that “out of the box” Google Analytics has always lacked in. Fortunately there is some event tracking you could consider to help deliver insight on form performance.
Form field drop out
Simple enough, firing an event when somebody enters or exits a form field will produce a funnel showing drop off. Taking this one step further and making it more accurate, you should be looking to write a function that checks if the user has entered anything into the form field before firing the event, so we know they haven’t just clicked through them all.
Validation error tracking
Building in event tracking to your validation engine will provide a quick way to find form fields that users are struggling with – fire an event that tells you it’s a validation error and captures form name, and form field name.
Time to complete fields
Measuring Engagement in Google Analytics:
Google Analytics has always provided some very top-level engagement metrics; Bounce rate, pages/visit, time on page etc. being the main ones. But, while these might be good indicators of engagement, it’s difficult to draw any tangible insight without more data. These event tracks look at how we could go about delivering some more meaningful insightinto user engagement on our site.
Accurate time on page:
Time on page has always been a metric that clients want to hear about. But what they fail to grasp in 99% of cases is that this actually only tells you the time from the visitor loading Page A to their next analytics page view request, Eg. loading Page B. ie. it takes the time stamp when you load page A and subtracts that from the time stamp when you load page B. So actually if a user hits our site, lands on our page and reads all the content on there, spending a long time then exits the site we have no idea how long they spent on the page. They would also be a bounce, which is a completely separate debate on when we stop considering a user to have bounced just because they only hit one page.
To improve the accuracy of our time on page, we could set up some time-based event tracking. Create a function that fires an event to Google Analytics every 5 seconds (or more or less but be wary of the 10 million hits/month limit) and enter 5 as the event value. This tells us how long each visitor was on the page to the nearest 5 seconds. We then add up the total event value for that page and divide by number of pageviews to give time on page in seconds irrelevant of what the user does next.
A long standing principle of web layout has been placing the important content above the fold. But, users these days are getting used to scrolling down pages, and actually now a more engaging experience can be delivered through long-scroll pages, such as parallax design. Toyota have a slick example of this on their new Auris page.
Clearly if you are going to create pages like this then you need to consider how to measure engagement with them. Users might be landing on your page and scrolling down all the content and engaging heavily with it but then leaving and because it is a single page visit it will still count as a bounce. So then there is the question of when to consider this user to no longer be a bounce and whether we consider this page to be a number of sub-pages. Where the user scrolls through different content sections we could fire a virtual page-view on each section or we could fire an event capturing that page section.
On top of this, we could fire events as the user scrolls a certain amount through the page, Eg. fire an event at 0%, 10%, 20% scroll etc. This would give a funnel showing drop off as users scroll down the page.
This one is something that should be taken on a case by case basis as to whether you use virtual page-views or event tracking in Google Analytics. Once this is decided, it is a relatively simple job to set up events or virtual page-view to track clicks on tabbed or expandable content.
Many sites consider the number of downloads of product brochures or leaflets etc. to be a KPI. Again, there is a decision to be made as to whether to use virtual page-views, event tracking or even Ecommerce tracking. And again, once decided it is relatively straight forward to set this up.
External links clicked
This is by no means an exhaustive list of things you should be tracking using event tracking in Google Analytics, but it is certainly a starting point. There are many other areas to consider, such as click to call or click to email links, tracking the value of quotes generated when you don’t want to use E-commerce tracking and many others.