Event Tracking Pt. 1: Overview & Data Model

October 16, 2007 by Justin Cutroni

One of the major new features announced by Google at the EMetrics summit is event tracking. There has been a lot of discussion in our industry about tracking events and only a few vendors offer this feature. I believe that Google is the third. Anyway, this post gives an overview of the new feature. Part 2 covers the actual implementation and part 3 covers the reporting.

What Are Events

an engaged visitorEvents are actions that visitors take on a web page that don’t generate new pageviews. Interacting with a video player, a widget or an audio player are all common events. Tracking these interactions provides a lot of insight into what visitors are doing on a page.

In the old GA we could track this data as a pageview. But this was really ineffective. First, it created lots of pageviews that polluted our true pageview numbers. Second, the reporting wasn’t built to handle events so it never provided any real insight. That’s why we now have event tracking.

Event tracking adds another layer of data to the visitor data hierarchy:

Visitors
Visits
Pageviews
Events

Now we can really get a good idea of how visitors are engaging our interactive content. This will be vital as web technologies, like Ajax and Flash, continue to evolve.

Every time an event occurs GA will increase the event counter. So if we’re tracking the click button event, GA will show us an agregate count of the clicks. I’ll cover the reporting in Part 3.

Start With Business Questions

Before I get into the structure of event data, I want to talk about analysis. All analysis starts with a business question. What is the most popular organic keyword that visitors searched for? How many sales did I have last week? What was the revenue for a specific campaign? Normally, when you’re using GA, you don’t need to do any special configuration to answer these questions. GA does most of it for you.

But with events, you need to create ALL of the data that will end up in GA. You literally need to define what data you want GA to collect both in name and in value. If you don’t know what business questions you want to answer, you won’t be able to create the correct data.

As I continue this post, I’m going to use an example, Google Maps. If I was an analyst for Maps I would want to answer a lot of questions:

How many people use the zoom and do they zoom in or out?
Which map view is most popular: map, satellite, hybrid, etc.
How many people drag a map waypoint to a new location?

To make things easy, let’s focus on one question: which map view its the most popular. So now that we know the question we want to answer, let’s talk about the data we need to answer it.

Understanding the Data Model

There are 4 parts to the events data model:

Objects
Actions
Labels
Values

Objects

Objects are parts of pages that we want visitors to interact with. This may be a video player or a cool Ajax widget. To continue our example, the object would be ‘Map’. Remember, the business question we want to answer concerns a feature in the map.

Actions

20071015-actions.pngThe second part of the data model is Actions. Actions are attached to an object and represent the actions that visitors perform on our object. Actions tell us what the visitor did.

There can be lots of actions associated with an object. Just think about our map. There are so many things that a visitor could do. But we want to define actions that relate directly to the business questions. Here are a few actions that our Map object might have:

Zoom
Change view type
Drag waypoint

Because we’re focused on one business question, we’re going to focus on one action: ‘Change view type’.

Labels

Labels quantify the action that occurred. If the actions tell us what the visitor did, the value tells us the result. So, for the ‘Change view type’ action that I created above, I might have the following labels:

Satellite
Map
Hybrid
Street view

Labels are really important to understanding actions. If an actions only has one value it does not provide any insight into what the visitor did.

Values

The final part of the data model is Values. Values are optional but can provide a lot of insight into certain events. Values can be any type of numeric data that indicates the value of the action and label. While there are not may good values for our example, let’s assign a monetary value to each label. Who knows, maybe someone viewing a hybrid map is worth more than someone viewing a regular map:

Satellite 5
Map 10
Hybrid 15
Street view 20

Values can also be monetary making it easy to identify what actions have real value.

Pulling it All Together

So let’s look at our business question and the data model we’re going to use to answer it.

Questtion:
Which view type do people use more?

Object:
Map

Action:
Change view type

Labels & Values:
Map 5
Satellite 10
Hybrid 15
Street Level 20

The next step is to implement the data model using event tracking code. That’s covered in Part 2. Oh, if the Google Maps team is reading, call me. I’m more than happy to lend a hand. :)

  • Twitter
  • StumbleUpon
  • Digg
  • del.icio.us
  • Facebook
  • LinkedIn
  • FriendFeed
  • Sphinn
  • Google Bookmarks
  • Reddit
  • email
  • Technorati
  • Yahoo! Buzz
Subscribe:
  1. 27 Responses to “Event Tracking Pt. 1: Overview & Data Model”

  2. Nice work! Will be very nice to see if someone watched a video or listened to an audio track within a page…
    Question, what is the cap on number of events? Does this upgrade open up the 4 goal limits?

    Thanks
    -Kevin

    By Kevin on Oct 17, 2007

  3. Hi Kevin,

    Thanks for the comment. I believe the limit on events is 500 per visit, but don’t hold me to that. Unfortunately the new upgrades do not include any changes to goal functionality.

    Thanks for reading and for the comment.

    Justin

    By Justin on Oct 22, 2007

  4. Excellent post Justin.

    I liked the way you elaborated carefully on the four components of events: Objects, Actions,Labels, Values.

    Your post gives us the right knowledge on exactly how to go about implementing event tracking.

    Thanks,
    Jahangir

    By Jahangir on Oct 28, 2007

  5. finally! someone shows IN DETAIL the necessary steps. great post, made my day a LOT easier :)

    By jimmy on Sep 30, 2008

  6. Maybe this is a silly question but… in your example

    var mapEventTracker = pageTracker._createEventTracker(‘Map’);

    I presume you have to state in the code for the page that the object is map – where do you do this?

    For example this object is on my website -

    what is the object name?

    By Rob on Jan 27, 2009

  7. Rob,

    The GA code for event tracking has actually changed. You no longer need to create an event object, You just need to add the event tracking code when the actions occur in your code.

    Check the GA code site for the updated code.

    Best,

    Justin

    By Justin Cutroni on Feb 11, 2009

  8. Hey Justin,

    Can you confirm with the updates that we don’t need to call trackPageview before trackEvent?

    I don’t need to place my GA script above trackEvent in the new method, correct?

    Thanks!

    By Josh Chambers on Feb 20, 2009

  9. Josh,

    You don’t need to call trackPageview() before you track events. HOWEVER, you do need to call initData(). Also, if you don’t call trackPageview() then GA will not create a visit for the visitor, this can lead to some funky data.

    Thanks for the question,

    Justin

    By Justin Cutroni on Apr 16, 2009

  10. Excellent post Justin! It’s kinda painful for a non-techie to be reading the GA documentation itself – i’m glad this clears things up a lil

    By Qing Ru on Oct 28, 2009

  1. 18 Trackback(s)

  2. Oct 16, 2007: Analytics Talk » Blog Archive » Event Tracking Pt. 2: Implementations
  3. Oct 30, 2007: Analytics Talk » Blog Archive » SiteScan for All!
  4. Jan 2, 2008: קוד חדש של גוגל אנליטיקס | בלוג אינטרנט
  5. Jan 8, 2008: Great Blog Posts From 2007 | Digital Alex - Marketing Strategy Blog by Alex Cohen
  6. Jan 13, 2008: Analytics Talk » Blog Archive » 2008 Google Analytics Resolutions
  7. Feb 1, 2008: Analytics Talk » Blog Archive » Google Analytics: Thoughts on the Future
  8. Jan 22, 2009: How long do your users spend on forms? | Imbimp.com
  9. Jun 4, 2009: Event Tracking Now Available in All Accounts - Google Stuff
  10. Jun 4, 2009: eCommerce Share » Event Tracking Now Available in All Accounts
  11. Jun 4, 2009: Event Tracking Now Available in All Accounts
  12. Jun 5, 2009: 谷奥——探寻谷歌的奥秘 (http://google.org.cn) » Analytics对所有账户开放Event Tracking功能
  13. Jun 12, 2009: Event Tracking Now Available in All Accounts [via feedly] | Evan Mullins Circlecube ReBlog
  14. Jun 13, 2009: Event Tracking Now Available in All Accounts | LiftSEO
  15. Jun 15, 2009: Event Tracking Now Available in All Accounts | rapid-DEV.net
  16. Jun 16, 2009: Event Tracking Now Available in All Accounts | work4real
  17. Dec 3, 2009: 网站分析术语在WAA和Google Analytics的对照表 | 网站分析 Web Analytics
  18. Mar 30, 2010: Tracking Internal Campaigns with Google Analytics – Analytics Talk
  19. Jun 17, 2010: Event tracking tutorial | Analytics for Marketers

Post a Comment