Now that we’ve touched on Virtual Page Tracking, (if you missed it you can view the virtual page tracking post here), we’re moving onto the next tool: Event Tracking.  One of the advantages of utilizing Event Tracking over Virtual Pagetracking is that Event Tracking  does not generate an additional pageview each time an interaction occurs.  It also permits you to organize your events in a more granular way: by category, action and label (there is a dedicated tab in your Google Analytics profile specifically for events that you want to track.)  The basic code should look like this:


Delving down further, a sample code for tracking a flash (youtube) video player, for example, might look something like this:

[code]onRelease (button) {_getURL(*javascript; _gaq.push([‘_trackEvent’, ‘Videos’, ‘Play’, ‘Movie Drama’)],"}[/code]

In this example, an event will be triggered every time someone releases the “Play” button on the video player, with the data being segmented by each argument grouping.  “Arguments”, (here, Category, Action and Label) dictate how the data will be organized in your Google Analytics reports.  Here is a quick glossary overview:

  • Category: The name that you use to identify objects (e.g. Games or Videos)
  • Actions: The name you give to the type of interaction you’re tracking (e.g. Play, Stop, Pause, Skip etc.)  You can also learn more about the specific thresholds on the video.  For example, if you’re concerned that people aren’t watching your videos the whole way though, you can track not just when they hit play, but also when they reach a certain point (30%, 50%, 75% etc.)
  • Label: Allows you to provide any additional information that you want to attach to the event you’re tracking.  This should be done to help organize the events (e.g. labeling videos by category i.e., Movies, Music Video, TV Show etc.)
  • Value: This is a purely optional category where you’re able to manually attach a numerical value to a certain event every time it occurs.

After you’ve input all your event values, there are additional ways in which you can filter your data.  Much like “Total Visits” vs. “Unique Visits” in standard Analytics, you can segregate your data by differentiating “Total Events” vs “Unique Events”.  This means that if someone watches the same video on your site 5 times in a row, you’ll have 5 “Total Events” but only 1 “Unique Event”.  It’s particularly useful because it allows you to analyze event-based interactions in much greater detail then you could with both normal or virtual pageviews.  It also prevents you from having to set up an additional pageview filter for your virtual pageviews as Event Tracking is already its own individual category.  These are particularly useful if you run as event tracking can really help you drill down which specific aspects of your site are leading to sales.