Events: Best Practices for Hierarchies and Naming Conventions

If you are looking to understand the actions that a user takes on your website, one of the best ways to do this is with event tracking. This can include (but not limited to):

  • Link clicks (on site or outbound)
  • Downloads (whitepaper, pdf, etc)
  • Scrolling
  • Load times

In Google Analytics, event tracking is made up of 4 elements: Category, Action, Label, and Value. The awesome thing about this is that the hierarchy use cases are highly customizable so events are a very flexible way to report on user action.

For larger websites/enterprises, I tend to track events in the following format, utilizing the category as a means of organizing actions based on site structure. Note that the ‘Value’ field is used to set a numerical value for an event, most useful when there is a monetary value associated with an action.

Category: location of event (Homepage, About Us page, Resources page, etc)
Action: action the user took (Video, Whitepaper download, Start Trial, etc)
Label: specifics about action (Video name, Whitepaper name, detail of linked clicked if there are multiple with same action (ex. Learn more – product A, learn more – product B, etc)

For example, on this blog, I have event tracking on the ‘Continue Reading’ button on the bottom of each post snippet on my homepage (index.html). So I have added the following event hierarchy (via auto-event tracking in Google Tag Manager):

Category: Index (location of button click)
Action: Continue Reading (name of button)
Label: destination URL (to know which post snippet drove people to continue reading)

In Google Analytics, if I pull a flat table custom report, I can see this data neatly in one place:
7bffa7cf13e900614fbafa040e9ce6e6

Another good use of the hierarchy would be for rolling up micro-actions into a larger action bucket. An example of this might be a video on a website. For this, you could code the event as:

Category: Video
Action: Play, Pause, Stop
Label: Name of video

One final use case I’ll mention here is tracking outbound link clicks. Event tracking can be a very valuable data point for this by setting up your hierarchy like so:

Category: Outbound
Action: Page URL (page link was clicked from)
Label: Click URL (destination link click takes the user)

Again, this is super easy to setup via Google Tag Manager. First, make sure you’ve enabled the necessary pre-defined variables. Then setup the tag which would look like this:
4542fefe9d2c2390d50f620934a2f0fb

For more detailed information about Event Tracking in Google Analytics, visit the help center.

 

Posted by Krista Seiden in her own words, not on behalf of her employer

Leave a Reply

12 Comments

  1. Pingback: Digital Debrief – Step by Step: Outbound Link Tracking in Google Tag Manager

  2. Glad that Google was nice to me and that I found this article today. A nicely written piece which expresses exactly what I was telling a client today (albeit slightly more eloquently than yours truly). Nice job.

    • bloggerchica

      Thanks! Glad you found it useful!

  3. Thanks for the article. However I would disagree with the approach: events are automatically recorded against the current page, which means that for any event, you have the following dimensions available:
    Page
    Page path level 1,2,3,4

    And if you’ve set it up, you even have content grouping dimensions (up to 5 per view). From then on it’s easy to create a custom report to have a view of your events based on the location.

    Accordingly using the Action Category to define location seems like wasting a field that should be used IMO to categorize actions (hence the name) around features. For things such as Whitepaper it’s not such a big deal because the only action is to download it, however we have features on our site users can interact with in many different ways, and using the category to group those becomes badly needed.

    Regards,
    Max

    • bloggerchica

      Max,

      Agreed that at times this approach can seem redundant. I find it most useful when using the API or other reporting methods that are only pulling 1 field, or when I want to break down a Category or Action by something other than the landing page/page/page path.

      The great thing about the event architecture in GA is that it is super flexible and customizable, so if your method works best for your reporting needs, then you should definitely use it!

      Best,
      K

  4. Pingback: Упрощенная настройка ремаркетинга Google Analytics, восстановление удаленных данных. | | Блог о мобильной и веб-аналитике

  5. Pingback: <br /><b>Warning</b>: Illegal string offset 'wp_post_meta_tag_title' in <b>/srv/users/serverpilot/apps/examplesofanalytics/public/wp-content/plugins/wp-meta-tags/wp-meta-tags.php</b> on line <b>41</b><

  6. Pingback: <br /><b>Warning</b>: Illegal string offset 'wp_post_meta_tag_title' in <b>/srv/users/serverpilot/apps/examplesofanalytics/public/wp-content/plugins/wp-meta-tags/wp-meta-tags.php</b> on line <b>41</b><

  7. Pingback: 10 Ways to Improve Your Next Google Analytics Data Analysis | SessionCam

  8. Pingback: Digital Debrief – How to Improve Engagement Tracking with Event Tracking

  9. Pingback: Digital Debrief – Using Event Tagging for Form Field Tracking

Next ArticleStep by Step: Outbound Link Tracking in Google Tag Manager