facebook twitter
Webucator's Free Advanced Google Analytics Tutorial

Lesson: Event Tracking

Welcome to our free Advanced Google Analytics tutorial. This tutorial is based on Webucator's Advanced Google Analytics course.

In this lesson, you will learn the basics of multiple domain tracking. You will learn how to implement your tracking across sub-domains and cross-domains.

Lesson Goals

  • Fundamentals of Event Tracking.
  • How to Implement Event Tracking.
  • Application of Event Tracking.

Introduction to Event Tracking

Web 2.0 has introduced us to many interactive elements embedded in a website such as video players, games, etc. Google Analytics by default cannot capture these interactions since when a visitor interacts with a video player no pageview is generated. Also, Ajax-based activities don't generate any pageviews and can't be tracked using standard GATC implementations.

Why to Use Event Tracking

Event tracking has the following advantages with respect to virtual pageviews:

  1. Event tracking won't generate an extra pageview each time an interaction occurs. Thus, you won't inflate your pageview count.
  2. Event tracking has it's own dedicated reports section. Thus, you'll be able to interpret event based interactions in much greater detail.

Understanding _trackEvent Method

The _trackEvent Method

The _trackEvent method consists of four different components. The following snippet shows the generic syntax for the _trackEvent method:

_gaq.push(['_trackEvent', 'category', 'action', 'optional_label', optional_value]);

The first two components i.e. (category and action) are required parameters. The label and the value parameters are optional.

Event Tracking Architecture (Category, Action, Label, Value)

Component Name Explanation
Category Used for specifying the name of the object or type of the object. Think of category as a big bucket in which certain events can belong (e.g. all the videos on your website). Takes only text values.
Action Used for capturing a particular action that a user will perform (e.g. clicking on Play button). Takes only text values.
Label Used for distinguishing different items. Within a particular category (i.e. within the video category) you can label different videos (e.g. Iron Man 2 Trailer). The label field is optional.

This parameter takes only numerical values. The value field can help monetize an event. This is an optional parameter.

Implementing Event Tracking

Here are two examples of what a code snippet might look like:

_gaq.push(['_trackEvent','Videos', 'Play Button', 'Iron Man 2 Trailer', 100]);
OnRelease(button){getURL("javascript:gaq.push(['_trackEvent','Video','Play','Iron Man 2 Trailer', 100]);

In the above example the flash code for the video player calls the _trackEvent( ) method and passes in values for each of the parameters.

Note: Google Analytics will only track up to 500 events per visit. Thus, plan ahead to ensure that you are not tracking highly repetitive events.

Event Tracking Reports

Overview Report

All of the event reports can be found under the Content reports in the reporting side panel. This Overview report provides a high level overview of your event tracking efforts. All events triggered throughout your site within a specific date range will be displayed in this report.

Adv Segment Default

Top Events Report

This report provides you with information on the category level (i.e. which categories recorded events). You can use this report to determine more analytics information on your Event Category, Event Action, or Event Label, and how many of your events occured for each measurement.

Adv Segment Default

Pages Report

This report goes through the pages on your website that have triggered an event you've setup.

Adv Segment Default

Event Tracking and Advanced Segments

Duration: 10 to 15 minutes.

You would like to find out how your event is performing in regards to visitors coming to your website from Google either organically or through paid search.


Within your appropriate profile, click on the Advanced Segment option and then create a new advanced segment using the following configuration:

Adv Segment Default