dan1978@gmx.net | My favorites | English | Sign out

Google Analytics

Event Tracking Overview

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. Additionally, pageview calculations are unaffected by user activity tracked using the Event Tracking method. Finally, Event Tracking employs an object-oriented model that you can use to collect and classify different types of interaction with your web page objects.

By contrast, tracking web page objects using the urchin.js tracking code requires virtual URL creation and provides no object hierarchy. With the legacy urchin.js code, user interaction with page objects is calculated and displayed as part of total page views to your site, and no distinction is made between actual and virtual pageviews.

With ga.js, you would commonly 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

This document assumes familiarity with Google Analytics Tracking Code (GATC) configuration. Additionally, you must have the ga.js tracking code installed on those pages where you configure Event Tracking as described here. For more information on tracking your site using the GATC, see the Tracking Sites guide as well as the documentation in the Analytics Concepts section of this site.

Design Philosophy

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.

  • 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.

  • 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. In addition, you can inform the report user about the different tracking possibilities available with Event Tracking to get the most out of your implementation. For example, the report user might be interested in tracking user behavior on a Flash video interface, but might also be interested in latency tracking for the load time of the video. In that case, you can plan ahead to have meaningful names in your event calls.

  • 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.

The rest of this guide describes the data model in detail and how to implement Event Tracking for your website.

Back to Top