ltr: Vol. 49 Issue 4: p. 27
Chapter 5: Event Tracking : Getting All Your Data
Tabatha Farney
Nina McHale

Abstract

One of the biggest drawbacks to Google Analytics is its inability to track all data from a website seamlessly. An essential high-impact practice is for libraries to monitor as much, if not all, of the clicks a website receives by implementing event tracking. Chapter 5 of Library Technology Reports (vol. 49, no. 4) “Maximizing Google Analytics: Six High-Impact Practices” introduces how to successfully implement event tracking and suggests the data libraries should track that Google Analytics does not track by default.


Google Analytics is a robust web analytics tool, but it suffers from the common web analytics tool drawback—it can track usage only from HTML-based web pages that are tagged with the same tracking code. Any non-HTML item, such as a PDF document, video player widget, or outbound link to a different website, cannot be tracked automatically in Google Analytics because those objects cannot be tagged with your library’s tracking code. Enter event tracking! Event tracking is an additional customization you make to a website that provides the ability to track any object on a website. This allows you to track your entire website’s use, which is one of the best practices you can implement on a website. In this chapter, we introduce the concept of event tracking and the events you will want to track, outline how to implement event tracking on your website, and conclude with advice on interpreting your event-relating reports.


Event-Tracking Overview

Event tracking is simply the process of tracking events. In Google Analytics, an event implies an activity on a website that does not trigger a web page request, or “hit”—so any object that is not a full web page. Outbound links are the most common event tracked in Google Analytics; however, there are many more events that should be tracked on a library’s website, including document downloads, web forms, video and audio players, and dynamically scripted elements or widgets.

Outbound Links

Outbound links, those links that navigate users to a different website, are the bane of most Google Analytics users because they are not tracked in the tool until event tracking or another tracking method is implemented.1 Many library websites are designed to intentionally lead visitors to other websites since a majority of a library’s online resources are provided by different vendors where the resource is hosted on the vendor’s web server. How many libraries have prominent links to OverDrive or to some other vendor database right on their home page? Even a library’s catalog is typically hosted on a separate domain and probably has its own Google Analytics tracking code, so it must be tracked as an outbound link.

Tracking outbound links is an essential part of Google Analytics because it shows where users are exiting your site to those resources (good way to leave a website) rather than counting it as a bounce (bad way to leave a website). If your library does not currently use any method of tracking outbound links in Google Analytics, you are inadvertently contributing to a higher bounce rate because the tool cannot discern a proper exit from a bounce if those links are not tracked! Additionally, tracking outbound links allows you to understand what resources your users find and connect to on your website. A library should identify and track all outbound links to understand exactly how users are interacting with its website.

Document Downloads

Event tracking is the best method for tracking the number of times documents, such as PDF or rich text files, are downloaded from a website. Since these documents are not HTML-based, there is no option for tagging them with the tracking code. Again, without implementing event tracking, Google Analytics has no way to track these downloads, and the data will not be included in any reports.

Web Forms

Whether a web form is a search box or a generic online form that e-mails the reference desk, it most likely has input fields and a Submit button. With event tracking, you can monitor how often users enter text into those text boxes or click the Submit button. This is particularly useful in determining if users begin to fill out a form but do not complete the process. Additionally, libraries can now see how often users are interacting with any form on their website.

Video and Audio Players

Have a Flash-based multimedia player on your library’s website? Then you could use event tracking to see the number of times a specific video has been played, paused, or stopped. It is the ideal solution for proving that users are interacting with your library’s online video or audio tutorials.

Unfortunately, this does not work seamlessly for tracking embedded videos—such as embedded YouTube videos that use iFrames to display the video. It is feasible to track YouTube videos, but additional coding must be added to the video script.2

Dynamic Scripted Elements

Dynamic scripted elements include JavaScript (and related JavaScript libraries like JQuery), AJAX, and other non-HTML script page elements or widgets. As long as the scripted widget is not iFrame-based, you can use event tracking to see the activity that widget receives. For example, you could track which web page users are more likely to use an instant message chat widget to send a question to the reference desk.


Implementing Event Tracking

Out of the box, your Google Analytics profile contains a series of Event reports (tucked under the Content section), but these reports are empty until you implement event tracking on your website. Implementing event tracking requires you to add the _trackEvent() method to every event you want to track. This can be a lot of work, especially if your site has numerous outbound links! To use the _trackEvent() method, you will need access to the website’s source code in order to add the following generic tracking script to each item you want to track:


What does all this mean? Let’s break down this script:

  • _gaq.push executes the Google Analytics tracking code.
  • _trackEvent tells the tracking code to track an event.
  • category is the name of the set of events you are tracking. For example, if you are tracking a selection of videos, you could use the category Videos to group them together.
  • action is the activity visitors do with the event. A video could have the actions of Play and Stop, while an outbound link could use Click.
  • label is the unique name of the individual event. A video could use the name of the video as its label, and an outbound link could use the name of the link. The label is optional in event tracking, but it allows you to differentiate which events are being used.
  • value is another optional attribute that assigns a numerical or monetary value to the event. An Events report could total the estimated value generated from the number of events triggered. For example, a library could assign a value to each click to a subscription database outbound link to understand the return on investment that database is providing the library.
  • noninteraction is an optional attribute designed to account for noninteractive elements on your website, such as the automatic transitions of images in a slideshow viewer. Setting noninteraction to True counts these automatic actions or transitions that don’t involve human interaction as events, but not as actual user-driven clicks on the web page. This type of event could possibly count as a bounce if the human visitor leaves without interacting with the site even if the event takes place. By not including this option, Google Analytics interprets all events, even if no human interaction occurs, as an interaction on your web page and not as a bounce.

Understanding the basics of the event-tracking script allows you to take full advantage of what the script can offer. Here are some examples of event-tracking scripts that could be used on a library’s website.

Tracking a Click to an Outbound Database Link

In this example, the event-tracking code triggers each time the link is clicked. The category is called Outbound Links; the action is click; the label is db/psychology/Database Name. This library used a lengthy label to indicate the outbound link is a database (db), the subject database page on which it is located (psychology), and the actual name of the database. Now the library can tell not only which database triggered the event, but also the specific web page on which it is located in case the database is listed on several different web pages. No value or noninteraction attributes were assigned to this event.

Tracking a JQuery Slideshow

This event-tracking script is called whenever visitors hover their cursor over the slideshow viewer. The JavaScript event onmouseover was used because this JQuery slideshow viewer pauses on the current image when a visitor hovers over it. The category is Spotlight; the action is hover; and the label identifies it as homepage slideshow. Again, no value or noninteraction attributes were applied. Since the noninteraction attribute is not included, whenever a person hovers over the slideshow, it counts as an interaction on the site even if that person leaves the site without clicking on any link.

Best Practices for Implementing Event Tracking

When you are ready to implement event tracking, there are a few best practices you should consider:

  • Use the label attribute so you can distinguish which object is triggering the event. The label can be more than just the name of the object, as in the outbound link example above. Remember to make the label name unique and useful for your library.
  • Create and use a controlled vocabulary when you choose your categories, actions, and labels. This is extremely important because if you use outbound link and outbound_link for your category attributes, then your Events report will have two different categories for the same set of objects: outbound link and outbound_link. You will have to go through your entire site to clean this up and consolidate them under one category attribute. Save yourself the hassle and create internal documentation that specifies the vocabulary for your event tracking.
  • If you are in a content management system (CMS) environment, check to see if there is a Google Analytics module or plugin that has a built-in event-tracking component. For all those Drupal-using libraries, beginning with version 7, Drupal’s Google Analytics module enables libraries to automatically track outbound links as events simply by checking a box in the module’s administration settings. All other events still need to be tracked with individual customizations to the code with this specific module or require an additional Google Analytics event-tracking module.

Drupal: Google Analytics Event Tracking module

http://drupal.org/project/google_analytics_et


Interpreting Event-Tracking Data

After at least one event is tracked on a website, it may take up to 24 hours for Google Analytics to reflect any event-related data. That data will be accessible in the Events report section (under the Content section), which includes an Events Overview report, Top Events report, Event Pages report, and Events Flow report. Each report displays different views of your event data to help you understand how events play an essential role on your site.

The Events Overview report contains a few standard metrics, including the Total Events and Unique Events a site receives, the values associated with the events, the number of visits to the site that contained at least one event, and the average number of events per visit. To clarify, the Total Events shows all the events that were triggered, and the Unique Events counts only the individual event once regardless of the number of times the website user triggered the event in that one visit. The rest of this report is designed to direct you to the Top Events report, so it is useful only for those standard events metrics.

The Top Events report is an extremely useful report that allows you to drill down to see the most used events on your site. If you included the label attribute in your event-tracking script, you can learn which individual events are the most popular on your site. This report defaults to displaying the event’s category information, and by clicking on that category you can see that category’s actions and their related labels that identify the individual events. Google Analytics makes it very easy to sift through the event data using segments or the advanced search. Remember the outbound link example earlier? Figure 5.1 demonstrates that by using the advanced search to limit to “db,” this library can see the most popular database links on its website without having to comb through all the data.

The Event Pages report reveals which web pages contribute to the most events. Click on the individual page to see the specific events that were triggered on that page. Libraries that did not implement an advanced labeling technique can still determine on which page those events are occurring.

The final Events report, the Events Flow report, is the most unusual because it visually displays the event data in a flowchart outlining the events users complete before leaving the website. This reveals how many users performed more than one event during their visit. Hovering over a specific event will show the event’s category, action, and label; total number of events (actions); and the number of visits that continued to stay on the site (Through Traffic) or those that left the site after performing the event (noted as the Final Event). This helps libraries understand how events assist website users navigating through the site to reach the desired library resource. Figure 5.2 shows that the most popular event on this site is the catalog search on the library’s home page. In a week, it received 895 interactions and a majority (nearly 90 percent) of those visits ended right after that event was performed. This makes absolute sense because the catalog search box takes users directly into the library’s catalog, which is on a separate website. However, in 10 percent of those visits, the users did not leave the site and continued on to do other events on the library’s site.


Events in the In-Page Analytics Report

If you ever wanted to distinguish between the same links listed more than once on a website to determine which one receives more clicks, event tracking can be seen as a potential solution. For example, suppose a library’s website has a link to its tutorials-and-guides web page both on the library’s home page and in the library’s drop-down navigation menu, which is also on the home page. By using the labels in event tracking, that library can tell which link is receiving more traffic by tracking one as “home/tutorials” and the other as “nav/tutorials.” While this works, Google Analytics has better options available. We suggest using the In-Page Analytics report, which is a separate report under the Content section. This popular report visually displays click data by overlaying the current web page with data collected in Google Analytics. Unfortunately, it does not display event data! Yet it does have a feature called Enhanced Link Attribution, which is an additional customization that can be made to a website to help track the same links as separate entities for this report.3


Conclusion

Event tracking requires planning to determine what objects to track and an implementation process that includes adding individual tracking scripts to each object being tracked. However, the benefit far outweighs the work required to implement because your library will finally be able to comprehend exactly how users interact with your full site. Additionally, the bounce rate will more accurately display the users who are actually bouncing versus those making a good exit by clicking on an outbound link to continue their search process. Lastly, the event data will be made accessible in other Google Analytics reports through the use of custom segments and custom reports and can also be included in those all-important conversion (goal) reports that will be discussed in the next chapter.


Additional Resource

Notes
1. The other possible method is _trackPageview, which creates a fake page view to track outbound links. This is not the preferred method because it can heavily inflate the total page views in other reports and will not be covered here
2. See Bryan Mythko, “How to Track YouTube Player Events in Google Analytics, ” The ROI Factor (blog), May 10, 2012, www.bluefountainmedia.com/blog/track-youtube-player-events-google-analytics
3. See “Enhanced Link Attribution, ” Google Analytics website, accessed March 4, 2013, http://support.google.com/analytics/bin/answer.py?hl=en&answer=2558867&topic=2558810&ctx=topic

Figures

[Figure ID: fig1]
Figure 5.1 

Database outbound links in the Top Events report, Google Analytics, University of Colorado Colorado Springs



[Figure ID: fig2]
Figure 5.2 

Events Flow report, Google Analytics, University of Colorado Colorado Springs



Article Categories:
  • Information Science
  • Library Science

Refbacks

  • There are currently no refbacks.


Published by ALA TechSource, an imprint of the American Library Association.
Copyright Statement | ALA Privacy Policy