Google Analytics Event Tracking Guide

Event tracking is an activity that can be carried out within the ga.js portion of your tracking code to track user interaction with elements of a website like a Flash-driven menu or a widget you may have installed. You can find event tracking reports in the Content section of your Google Analytics reporting interface but before you start tracking anything you will need to do two things:

1. Set up tracking on your site. Make sure you have set up tracking for your website. Click here to find out how you can install your Google Tracking code.

2. Call the _trackEvent() method in the source code of a page object, widget, or video.

Once tracking is set up on your website you can start looking at the five major components involved in Event Tracking which include categories, actions, labels, values, and implicit count.

Category: A category is the root level of event tracking (or the name of the group of objects you wish to track) and is the base level for sorting your events. Some example categories are “Videos” and “Downloads”.

Category appears in the reporting interface as Top Categories in the Events Overview page. Typically, you will use the same category name multiple times over related UI elements that you want to group under a given category.

For example, you might track user interaction on three separate controls on a single video interface using:

_gaq.push([‘_trackEvent’, ‘Videos’, ‘Play’, ‘Gone With the Wind’]);

_gaq.push([‘_trackEvent’, ‘Videos’, ‘Pause’, ‘Gone With the Wind’]);

_gaq.push([‘_trackEvent’, ‘Videos’, ‘Stop’, ‘Gone With the Wind’]);

There is also an option to when tracking video files to find out how many times a video has been downloaded by using the code outlined below.

gaq.push([‘_trackEvent’, ‘Videos’, ‘Downloaded’, ‘Gone With the Wind’]);

In this case, there would be only one category—Videos—in the Events Overview page for Top Categories, and you could see aggregate metrics for user interaction with the total set of elements for that single video object.

Action: An action which is commonly referred to as a string is something that pairs categories and defines the interaction between the user and the website. Typical examples include clicking the Play or Stop buttons for a video. However, actions can be described by any string you specify. You can, for example, have an action called “Video almost finished” that triggers when a video reaches 90% completion.

As with categories, the names you provide for an action is up to you, but keep in mind two important features of how an event action is used in the reports:

1. All actions are listed independently from their parent categories.

This provides you with another useful way to segment the event data for your reports.

2. A unique event is determined by a unique action name.

You can use duplicate action names across categories, but this can affect how unique events are calculated. See the suggestions below and the Implicit Count section for more details.

Label: A label is an optional string used to provide greater levels of information to the event. With a label you can specify any type of string.

As with Categories and Actions, the reporting interface has its own section for all labels you create for your Event Tracking. Think of a label as a way to create an additional reporting dimension for user interaction with page objects. For example, suppose you have five video players on your page that you want to track interaction with, while this may seem like it would make tracking video files difficult there is a solution. Each one of these players can use the “Videos” category with the “Play” action, but each could also have a separate label (such as the movie name) so that they appear as distinct elements in the report.

Value: A value is an integer that can be used to provide numerical data about the event you are tracking in any category. Most often explicit values are used; however there are also inferred values that you can define for an event such as “Download Time”

The name of the video is provided as a label, and the computed load time is accrued for each video download. You could then determine average load time for all “Video Load Time” actions for the “Videos” category. Suppose you had 5 unique downloads for your website videos with download times in seconds as:

The reporting interface would then compute these as follows, with the numbers in this example illustrating download time in seconds:

# Visits Value Average Value

5          53         10.6

Negative integers are not supported at this time.

Implicit Count: This is a very important component for event tracking as it allows a Boolean or character within your coded website feature to be set to true. This then indicates to the search engines that the event will not be used in the overall bounce-rate calculation.

In Event Tracking, each interaction with a tracked web page object is counted, and each interaction is associated with a given user session. In the reports, Total Events are calculated as the total number of interactions with a tracked web page object. On the other hand, where a single user session (or visit) has one or more events, this is calculated as a single Visit w/Event, orUnique Event in the reports.

The design model for Event Tracking is highly flexible, and its use can be extended well beyond the common model of user-triggered events—the design decision is up to you. For this reason, useful Event Tracking reports require collaboration with your report users and good report planning.

To find out more about how you can set up Event Tracking or get to grips with a host of other useful Google Analytics tools visit our Info Centre. Alternatively you can Contact Webresults.ie today and one of our Google Analytics consultants will be more than happy to assist.