Setting up Google Event Tracking: What You Need to Know

  In SEO

Knowing how many people visit your site (and how often) is certainly important when developing and enhancing an SEO strategy. However, it’s also beneficial to understand how users are behaving on your site. That’s why you need to take advantage of Event Tracking (also known as Event Measurement) in Google Analytics.

Event Tracking is not a default Google Analytics feature. You need to set it up before you can use it. This is worth your time. With Event Tracking, you can essentially track behaviors users engage in on your site that don’t bring them to new pages. Examples include watching a video, downloading a file, clicking on a mobile ad link, and similar actions.

It’s easy to understand the value Event Tracking offers. For instance, you may want to determine if guests on your site are engaging with a video frequently. This helps you decide whether to post similar content in the future. If the video isn’t attracting viewers according to your expectations, you can adjust your content marketing strategy.

Event Tracking provides these insights. This guide will teach you how to set it up, and how to leverage it to your benefit.

The Basics of Google Events

The first step in the process is ensuring you thoroughly understand the various components of an event as defined by Google. You’ll need to define these when configuring your event. They are:


As the name implies, this is simply the category a particular event belongs to. Grouping events together makes it easier to track them. For instance, if you want to track different events related to videos on your site, you would create a category for videos. You could also define a category more specifically by, for example, making different categories for different types of videos.


Here, you define the action you’re measuring. To continue with the example above, actions you might want to track related to videos include users playing a video, pausing it, etc.


This component is simply helpful if you want to differentiate certain events. Again, if you’re tracking how often guests play specific videos on your site, and you have multiple videos on the site, you can give each event a label that tells you what video the event relates to.


This component must be an integer (and cannot be a negative integer). It simply assigns a value to your event.

For example, perhaps you believe that the longer a user watches a video, the higher the return-on-investment. You can thus define specific playback markers and assign a numerical value to each of them. Maybe someone watching your video for five seconds has a value of 1, someone reaching the 10-second mark has a value of 2, someone reaching the 15-second mark has a value of 3, etc. Your reports will average the values together to determine a single value for the video. Although you don’t always need to include this information when configuring an event if it’s not relevant, it can be useful in certain cases.

Using Google Tag Manager

Google Tag Manager is a useful tool that lets you easily and efficiently update certain pieces of code on your site. Although you can set up Event Tracking without it (this process is described later), if you lack coding experience, you’ll probably find it’s easier to work with Google Tag Manager. Google describes how to install the tool here. Once you’ve installed and opened it, confirm all click variables are enabled by selecting Variables on the sidebar, then Configure. Make sure all are checked.

Now, select Tags from the sidebar, then select New, to create a new tag (this is simply a piece of code) for an event you want to track.

You’ll be prompted to select a type of tag to create. Select the Universal Analytics, then set the type to Events. Now you can configure your tag, as shown in the example below:


After you have completed the necessary fields, Select Continue, and select your Trigger:


Keep in mind that you may need to create a Custom Event if the default options don’t meet your needs. Google describes how to do this, but you might have to coordinate with your developer or another specialist to generate the code you want.

Once you’ve chosen or created your trigger, save it, then check to see that it appears in your tag. If it does, select Save Tag to continue. Now you can monitor that event.

Manually Setting Up Events

It’s also possible to set up Event Tracking manually. Again, you should only go this route if you have coding experience and are comfortable with your degree of expertise.

First, head to the Admin section of your Google Analytics account, choose the property you wish to track events for, and get your Tracking ID, as shown below:

Now, directly after the <head> tag for all your pages, add the following code snippet:

<!– Global Site Tag (gtag.js) – Google Analytics –>

<script async src=””></script>


window.dataLayer = window.dataLayer || [];

function gtag(){dataLayer.push(arguments);}

gtag(‘js’, new Date());

gtag(‘config’, ‘GA_TRACKING_ID’);


Replace the part that reads “GA_TRACKING_ID” with your own Tracking ID.

Next, fill in the relevant information in this code snippet, then add it to the element associated with your event (such as a video):

ga(‘send’, ‘event’, [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);

Additionally, you need to add an event handler, which is HTML code that triggers the tracking process when users take the relevant action. Check event handlers you may use (and how to use them) here.

Now, head back to the main page of your Google Analytics account and check for Events under Behavior in the sidebar:

If the event shows up, that means the process worked, and you can now begin tracking that event.

The more you experiment with Event Tracking, the more you’ll learn what types of events to monitor, and how to use the insights gleaned from them. (Luckily, this extremely useful tool helps you generate codes for different types of events you might want to track.) This is key. Again, when you know how people are behaving on your site, you’ll know what you’re doing right, and what you’re doing wrong.


Marccx Media
Michael Peggs is the founder of Marccx Media, a digital marketing agency specializing in Search Engine Optimization (SEO) and Search Engine Marketing (SEM). Before Marcxx, Peggs worked at Google in business development, forming digital media and advertising partnerships in the United States and Asia. He is also a contributor to The Huffington Post, FastCompany and Business Insider as well as and podcaster, hosting the iTunes Top 10 New & Noteworthy Podcast You University.
Recent Posts