How to Improve Engagement Tracking with Event Tracking

Better data enables better decision making, and it begins with how you track it – to provide more context to what’s already out there. Because by knowing more about the context, you’ll be better equipped and informed.

When I’m interviewing prospective interns or senior roles for our marketing team and we get to questions about their knowledge of Google Analytics, I always ask them two questions to get a sense of their proficiency level:

  • Have you worked with Advanced Segments
  • Do you know how to use Event Tracking and can you explain how it works?

To me, both are essential for getting a better sense of the data and the users on your site. With this post I’d like to explain the importance of Event Tracking and how we use it at The Next Web.

What is Event Tracking and what can you do with it?

To get an idea of what Event Tracking is, let’s take a look at the original definition as found in the Google Analytics help guides:

“Event Tracking is a method available in the tracking code that you can use to record user interaction with website elements.” … “The design model for Event Tracking is highly flexible, and its use can be extended well beyond the common model of user-triggered events—the design decision is up to you.”

What does this mean for you? By default, Google Analytics will track all the pageviews on your site, but if somebody clicks a link to an external site that you’ve linked out to or a link to download a PDF (which won’t contain a tracking code), you won’t know how many clicks it got. That’s where Event Tracking can be useful, because it will ensure that you can track the link click by adding an additional line of code to the link or by using the right triggers in Google Tag Manager.

So what would be some (great) examples for Event Tracking?
What kind of elements do we track in Google Analytics for The Next Web, and how can we use that information to report on the performance of, for example, a button or form?

  • Some ideas on how to leverage Event Tracking from basic to more advanced:
    Button Tracking: This is likely the most common element on your pages that you’d like to track. By adding an onclick event to the buttons that lead to a new page, you’ll be able to categorise the clicks by button.
  • Outbound click tracking: People are clicking on internal or external links in your content and you want to know how many outbound clicks this generates. By automatically adding outbound click tracking to these links you’ll be able to measure this.
  • Form Submissions: How many form submissions do you have and is this before or after validating the form? By adding onsubmit Events to the forms that you have, you’ll be able to monitor submissions.
  • JavaScript Errors: You probably have developers working on your site, so things could potentially break when changes are made. What if you could track the JavaScript errors that occur on your site? Google Tag Manager makes this possible with their triggers for JavaScript errors. If you set up a Tag for Event Tracking with the information from the JS variables in Google Tag Manager, it will provide you with the needed information for debugging that you can send back to your developers.
  • Scroll Tracking: Ever thought about scroll tracking if you have a long page? Do you really know how far down the page people are reading your content? By setting up custom scripts in Google Tag Manager you’ll be able to send hits (of any type: event, pageview) to measure this.

Example of using event tracking to track engagement via Scroll Depth


Improving your time on page/site with Event Tracking
Do you have a site with low engagement? This could actually mean the time on page metric of your pages isn’t correct. By default, Google Analytics won’t be able to measure the time on page when you don’t manually send some type of interaction event on that page. So when there is no interaction during a pageview and the user bounces from that page the duration of that visit won’t be calculated. There is an easy way to improve this metric, however: you can get an updated time on page by tracking additional timestamps sent with each additional event hit. Put simply: when you send more events, your time on page will become more accurate.

But isn’t this affecting bounce rate as well? Yes it is. So you have to take this into account when setting up your tracking. For The Next Web, we decided to keep the bounce rate as natural as possible. In the advanced part of this post I’ll share more on how you can make sure the bounce rate isn’t affected while tracking more.

How to add Event Tracking:
So at this point you’d like to know how to implement this, right? There are two main options.First,, you can add it directly to the HTML of your pages. Or, if you’re using Google Tag Manager, (which I would highly encourage), you can use GTM to send events via the data Layer with the necessary information.

Google Tag Manager:

1. Find the element that you want to add Event Tracking to.
2. Add an onclick element to it to send data to the data Layer: onclick=”dataLayer.push( {‘event’:’onClick’,’eventCategory’:Category,’eventAction’:’Action’,’eventLabel’:’Label’,’eventNonInteraction’:1} );”
3. Make sure you’ve set up variables in GTM for the Event Category, Event Action, Event Label.
4. Create a new Tag in Google Tag Manager for the Event you’d like to track.
5. Create a new Trigger based on the name of the Event in the dataLayer push.

Note – You can make these changes/additions in GTM without a developer if you know how to use it. Want to learn more? Take the Google Tag Manager Fundamentals Course on the Analytics Academy.

HTML: Note – You would need developer resources to make code changes.

1. Find the element that you want to add Event Tracking to.
2. Add an onclick element to it: onclick=”ga(‘send’, ‘event’, Category’, ‘Action, ‘Label});”.

Want to save time implementing Event Tracking? AutoTrack it is!
After reading all the examples on what you can track with Event Tracking, you’re probably put off by how much work it is. Since it can be very time consuming and would necessitate some technical skills to implement some types of event tracking, Google released a better way for you to add tracking: AutoTrack.

Adding AutoTrack to your tracking set-up will save a lot time otherwise spent implementing code. I won’t go into more detail around AutoTrack as the documentation around it does a good job of explaining everything you need to know.

Improve your Reporting around Event Tracking
By now you’ve set-up your Event Tracking, or at least have some ideas on what you want to be tracking. Now you’d also like to know what the next steps are, and how you can leverage the data for your reporting.

The first step in doing that is to use Top Events. When you’re in Google Analytics click: Behavior > Events > Top Events. This view will show you the Event Categories that you’ve used while setting up your tracking. Clicking on it you will take you one level deeper to Event Actions tagged within that category. Clicking another time will give you the Event Labels. You can see more detail on Event Hierarchies and Naming Conventions in Krista’s article here.

Creating Goals!
One of the most valuable ways of using Event Tracking is viewing this data in Google Analytics Goals. If you’re familiar with the setup of Goals in Google Analytics, you can set up a goal via the Category, Action, and Label from Event Tracking to proceed.

Let’s again look at the example of clicks on a ‘Download’ button. In most cases this will lead to a PDF file which can’t contain tracking and won’t have its own pageview. So in this case, we’d set up event tracking on this download button. For example, when you click on the Download button, it could trigger an Event Category of “Landing Page” and an Event Action of “Download”.

You could then use this Event Category and Action to set up a goal. By setting up goals, you’ll be able to enhance your analysis by using them across different reports in Google Analytics as conversion metrics or in segments. In our Download Button example, this will make it easy to report on the click through rate (CTR) even though we can’t record a pageview for that PDF download.

Getting more advanced: Non Interaction & Transport Beacons
If you want to get more advanced in order to get the most out of your tracking efforts, the following two elements will help you make your event tracking pitch perfect.

Non Interaction: By default, every event that you track will influence the bounce rate, so firing just one event on a page will bring the bounce rate down to zero.This is not quite what you’re looking for if you want to have a clear understanding of what is really happening with engagement on your site. That’s where the non interaction value can come in handy. With this element you can override the default value of ‘true’ and make sure that the interaction isn’t used for bounce rate calculation. Think carefully about what you’d like to track, since it can be useful for some elements to have a measurable influence on bounce rate, such as buttons/links that lead to PDFs or other files that have limited tracking implemented.

The additional nonInteraction element in a classic example:

ga(‘send’, ‘event’,
‘eventLabel’, {
nonInteraction: true

Transport Beacons: Ever heard of them? I’m guessing probably not. They are one of the more advanced features of Event Tracking and will only have a discernable impact on sites with a lot of events and traffic. But if you want your Event Tracking to be rock solid, it can be a good addition. Some interactions on your page that you want to start tracking will lead to pages that don’t have a tracking code on them – again, think buttons for PDF downloads or clicks to external links. As you move away from the site with tracking it’s possible that the event hasn’t yet fired before the new page is opened. While a fast load time may be good for you as a user, it can be bad for tracking purposes. Adding the transport beacon to your event tracking will make sure that the event is still sent.

What it looks like? Just an extra line in your event tracking tag:

ga(‘send’, ‘event’, {
eventCategory: ‘Outbound Link’,
eventAction: ‘Click’,
eventLabel: link.href,
transport: ‘beacon’

Soo.. what kind of elements on page are you tracking with Event Tracking, and what were your biggest learnings?

TL;DR: Event Tracking can improve the tracking you already have in place and enables you to track on page engagement. If you want to know more about the goals you have on page, such as button clicks, form submissions or JS errors, event tracking will help you gain a more solid understanding of what is going on. AutoTrack is a great way to more easily manage the set-up. Finally, the advanced elements of Event Tracking, such as Non-Interaction Value and Transport Beacons, will get your tracking set-up closer to perfection.

*This guest post was written by Martijn Scheijbeler, Director of Marketing at The Next Web. He’s responsible for the execution of its marketing strategy involving audience growth & engagement, marketing analytics, product, and data across all projects related to The Next Web: Deals, Academy, & Conference. Follow him on Twitter @MartijnSch.

Leave a Reply


  1. Awesome post 🙂 – where can start learning more about GTM?

  2. Pingback: Digital Debrief – Step-by-Step: QA Your GTM Container with Preview and Debug Mode

Next ArticleJapan