Event Tracking is a feature of Google Analytics you use to track different actions visitors take on your website, such as clicking a button or downloading a file. It is useful for tracking actions on your website that don’t take the user to a new page (such as clicking play on a video player).
Event Tracking is a method available in the ga.js tracking code that you can use to record user interaction with website elements, such as a Flash-driven menu system. This is accomplished by attaching the method call to the particular UI element you want to track. When used this way, all user activity on such elements is calculated and displayed as Events in the Analytics reporting interface.
With ga.js, you can apply Event Tracking to:
- Any Flash-driven element, like a Flash website, or a Flash Movie player
- Embedded AJAX page elements
- Page gadgets
- File downloads
- Load times for data
Important points you should keep in mind –
1. Determine in advance all elements for which you want to track data.
Even if you initially track only a single object on your website, having an overall sense of the various objects/events you want to track will help you establish a report structure that scales well with an increase in the number and type of Event Tracking.
2. Work with your report user to plan your Event Tracking reports.
Knowing in advance how the reports should look will direct the structure of your Event Tracking implementation. For example, if the reports only need to show video UI interaction, your category structure will be quite different than if the reports need to track other Flash UIs like menus, embedded gadgets, and load times.
3. Adopt a consistent and clear naming convention.
In the process of implementing Event Tracking, every name you supply for categories, actions, and labels appears in the reporting interface. In addition, a category/action pair is treated as a unique element in the report statistics, so consider first how you want your metrics to be calculated for all objects belonging to a similar category.
How do I set up Event Tracking?
Before you can view the Event Tracking results, you must set it up on your site. Read on to know how.
1. Set up tracking on your site. Make sure you have set up tracking for your website.
2. Call the _trackEvent() method in the source code of a page object, widget, or video.
The specification for the _trackEvent() method is:
_trackEvent(category, action, opt_label, opt_value, opt_noninteraction)
- category (required)
The name you supply for the group of objects you want to track.
- action (required)
A string that is uniquely paired with each category, and commonly used to define the type of user interaction for the web object.
- label (optional)
An optional string to provide additional dimensions to the event data.
- value (optional)
An integer that you can use to provide numerical data about the user event.
- non-interaction (optional)
A boolean that when set to true, indicates that the event hit will not be used in bounce-rate calculation.
3. View the reports. Once event tracking has been set up and working on your site for a day, go to the Content section of the reports and view Event Tracking.
Event Tracking data can be full of insights you never knew. Put a plan together for what metrics are going to be most useful to you and who/how they should be reported on before you decide on the implementation. This can also help you work out how best to name your Events to allow for the best analysis.
Got any thoughts on Event Tracking? Share them with us in the comments section below 🙂