Everything you need to know about event tracking

In the last guide, we have covered how you can further understand your website with Google Analytics. We have learned how to Sign up for Google Analytics, add some code to your website, and there you go. 

Solely Google analytics, aka GA, is great, but GA with Google Tag Manager/Event Tracking is excellent. Without Google Tag Manager/Event Tracking, You are not able to track some important interaction happened between your website and visitors.

Let’s Find out what’s missing:

That essential Google Analytics doesn’t show how far your users scrolled through your website pages. Whether they navigated all the pages, viewed any videos, or if they clicked any of your CTAs (Call-To-Actions), it lets you know everything.

Don’t you want to know whether the visitors downloaded the resources on your website or not? How they interacted with your forms? To extract all these details, you will need an extra tracking code.

In order to get better outcomes of your site, you should start by collecting accurate information and understanding to derive penetrations from it. To improve the performance, you should know what actions users are performing on your website and calculate how you can leverage this data in your marketing goals.

One of the most high-level features of GA is Event Tracking, which enables you to follow the user’s particular behavior. It also helps you in identifying the very element they are clicking on. By getting all these data acumens, you can gauge how effectively critical aspects of your pages are functioning and recognize issues on your site with more accuracy.

We are here to let you know about event tracking in GA.

This guide will help you how to set up Event Tracking in Google Analytics as well as GTM. We will also share with you a couple of alternatives that will help you save your valuable time. At the same time, you can apply these tracking upgrades to your website.

kick-ads-google-analytics

What’s event tracking in Google Analytics? (Definition and basics)

It is a Google Analytics tool that is utilized to measure the user’s actions on the website. It explicitly permits you to track user’s click every time on a particular element, such as Play or Buy Button. You can also use event monitoring to estimate how notably a user scrolls down your page. It will help you in understanding how your visitors involved with your content.

Through this, you can track each action users are practicing on your website, including regulating performance against highly specific metrics and Key Performance Indicators (KPIs), such as video views, PDF downloads, etc.

Mainly event tracking reveals crucial data and enables you to understand what visitors are doing on your site.

google-analytcis-blog-paste

This code lets you follow the user’s behavior based on the URL through which they visit your site.

Though you can do the fundamental tracking with the usual GA tracking code, this binds you to functions determined by a unique URL. This works precisely when the steps you want to track lead the users to a new page, or track how your visitors are growing through the sales funnel you have set.

But there are some important activities that you can’t track through the basic code, and event tracking comes in to picture. Here no URL means you can’t follow this activity with a regular GA tracking code. Thus you should use event tracking, preferably.

You can also go through this link to get an overview of event tracking: https://developers.google.com/analytics/devguides/collection/analyticsjs/events.

What else can event tracking be used for?

You can use event tracking to track any user’s action that includes a click.

Let’s find out what can be tracked through event tracking:

  • Conversions that don’t send users to a different page, also known as lightbox conversions.
  • Find out how many users have downloaded your resources, such as digital downloads and PDFs.
  • Track the number of users that click the play button and for how much time they watched your video.
  • This also helps you in tracking outbound links. It helps you to view when users click through the external pages.
  • It helps in measuring how effective your affiliate marketing policy is.
  • Monitor the form of abandon rates, issues, and form optimization issues.
  • It also helps you to track how far your visitors scroll down the pages to know how much your content they are seeing, and whether they are reaching your key elements such as CTAs or not.
  • Even if you want to optimize your landing page to maximize your viewer rates and want to see what kind of impact this has upon your conversions, then event tracking makes it possible to understand why your website conversions haven’t increased.

How can you use event tracking?

To use event tracking, you should first install GA on your website. If you haven’t done that yet, go through an essential guide to set up Google Analytics. Before setting up the event tracking, you need to keep these things in mind.

  • Select on which critical elements of your site you want to track with event tracking.
  • Choose a consistent and a naming convention for a different action, label, and category options available to you when you are setting up the tracking event. Every name that you will give to each category, activities, and labels appears in the event tracking reports.

Do you need a Google Tag Manager to set up your event tracking?

First, let’s have a brief of Google Tag Manager. It is a stand-alone tag management tool that integrated seamlessly with Google Analytics. We will cover everything that you should know about GTM in our next guide. Stay tuned with us.

Though there’s no necessity to use GTM to track events, you can manually add the event tracking code to your website and gather the same event data.

The process of manually adding the event tracking code to a site can take days or weeks. It can also cost you a few thousand dollars, which depends on the web developer’s time and charges. It takes a lot of time to debug, test, and maintain the code as your tracking needs change as per time.

This guide will cover both methods and let you know what to do first before implementing GA event tracking with GTM.

Setting up the event tracking feature in Google Analytics. (Manually as well as through GTM)

There are two techniques to set up event tracking in GA. Either you can do it manually through code or can do it through Google Tag Manager for setting up quickly without coding.

1. Manually setting up the event tracking in Google Analytics (Via Coding)

If you want to set up the event tracking manually, then you will need to add the additional code to the components from which you want to gather the data.

gtm-code-paste

There are four different parts within that code snippet that you will require to define on your own: event Action, eventLabel, eventCategory, and eventValue.

As per the above image, Category, and Action, these two are required elements while Label and Value are available as options. It entirely depends on what type of data you want to accumulate from GA when a user clicks on the predefined element.

If you examine your site and determine which actions you want to track, then it will be easier to define these elements. Let’s have a look at what these components are used for:

  • eventCategory: It is a whole group of events, which includes multiple activities within the related category, such as download, CTA, video, form, etc.
  • event Action: It tracks distinct action for an individual event within its category, such as PDF downloads, play on videos, submission of forms, and click on CTAs.
  • eventLabel: A label that you can use to add additional info such as if you have many PDF downloads, you can label them separately to distinguish them.
  • eventValue: It allows you to set a numerical value to the action to recognize the importance of specific actions.

Your eventual HTML code for one of the PDF download event tracking may look like this:

<button onclick=”ga(‘send’, ‘event’, [download], [PDF], [event_tracking_guide], [30], [fieldsObject]);”>Example Button Text</button>

In the above code, you have formulated an event that will track the users when they download your PDF on event tracking, put it within the download category, and specified it with a value of 30.

If your code is in position, your tracking details will be under the Behavior>Events on the left of Google Analytics.

Though to track activities like outbound links, PDF files, links that open up your Email program, video player interactions,etc., these function applying the GA event tracking schema is usually used to achieve the task that GA code can’t.

2.How to set up event tracking with Google Tag Manager(GTM)

If you don’t want to set up the event tracking with the coding thing, or you don’t know how to code, then you should prefer setting up event tracking with Google Tag Manager.

To set up in GTM, you should have an account before getting started with event tracking. Fill your details and agree to the terms and conditions and set up your GTM account.

Once it’s all done, you will see a dashboard like this:

Before creating the first tag, you have to enable the built-in variables in GTM. For this, you have to click the Variable Tab on the left side and then press the Configure button. It will then show you a checklist on the right side.

choose-trigger-in-event-track

Scroll down and press click of the list also check all the items of the list.

click-variable

Now go back to the dashboard, click on the Tags sections from the left and press New of the next screen. Name your tag first in order to create your tag in the top field of the screen and choose your tag type and trigger.

Next, you want to go back to the main dashboard, select Tags from the left-hand menu, and click New on the next screen. To create your first tag, you need to start by naming your tag in the top field of the screen below and then choosing your tag type and trigger.

After naming your tag, do press the first box to pick the tag type. Then from the pop up on the right, select Google Analytics- Universal Analytics.

tag-event-track-in-gtm

Now a pop up will appear, which will ask you to define the Track Type & Google Analytics settings. You should go to the Event from the menu, which will drop down after you will click on the Track Type.

Now fill out the same event tracking components.

If you have defined these, you can move to another box and select the trigger type that will help you in firing your tag. Click on the box appeared and then press the + sign that will appear on the right of the next screen.

Click on the Trigger Configuration box to see a list of different triggers that you can select on the next screen. You can also name your triggers.

choose-trigger-in-event-track

 

In the last section, you should select Click-Just links and then tick the Some Link Clicks option. It will enable you to set the trigger to only fire an element that is clicked with a URL that contains the .pdf extension.

gtm-track-marketing

Once it’s all done, then you can click on the save button, and you will see your new tag in the Tags section in Google Tag Manager. You should also use Google Analytics to improve the performance of your website.

When to use Event Tracking?

You should use event tracking to track those types of users’ interactions, which are not similar to a page being seen.

What you can track:

  • Views on videos
  • Viewing video footage of a certain length
  • Clicks on videos/pause/stop button
  • Clicks on the form button
  • Interaction with gadgets
  • Clicking on an image or an external link
  • log-ins
  • abandonment of form
  • Sharing blogs/articles etc

Top three events to track

Tracking Scroll Depth

It is one of the most critical events and has been a buzzword among marketers. Scroll depth event allows you to understand how users engage with your content even if they view your page once and bounce.

The below-mentioned steps will guide you on how you can configure scroll depth tracking using the built-in variables and triggers in GTM.

First, enable the built-in variables inside the GTM. To do that, go to ‘Variables’ and then click ‘Configure.’ After allowing the variables, you have to click on the ‘Scroll Depth Threshold’ then ‘Scroll Depth Unit’ and ‘Scroll Depth Direction’ variables at the bottom of the dashboard.

In the second step, you have to create a new tag by going to ‘Tags’ and pressing ‘New.’ Select the ‘Universal Analytics’ as the tag type and then select Event as the track type. Now enter ‘Scroll’ as Category and for ‘Action’ click on the variable icon at the right. You will have to select the ‘Scroll Depth Threshold’ and add the percentage sign after the variable.

The vale of action will appear like in the below image:

scroll-depth-setup-and-event-trackihng

Click on the trigger panel, which is below the tag, and click on the plus sign to create a new trigger. Pick the ‘Scroll Depth,’ then choose the ‘Vertical Scroll Depth’ and enter the value as 25,50, 75,100 in the percentage. Your trigger will be like this:

Now the final step is to save the tag and trigger, then submit the engages to your site. This will now enable you to see how people are engaging with the pages of your website. You will also be able to report on people scrolling 25%,50%,75%, and 100% of your pages.

kickads-scroll-depth-running

ga-in-scroll-depth-work

Video Tracking

Tracking youtube videos inserted on your site is not that complicated process. These steps will guide you to track people watching your videos in Google Analytics.

Just like we did while setting up the Scroll Depth event, first enable the built-in variables in Google Tag Manager. Repeat the same, Click on ‘Variables’ then press ‘Configure.’ Now select the ‘Video Variable’ at the bottom of the panel.

video-track-in-gtm-kickads

In the next step, you have to create a custom variable by clicking on the New button and selecting ‘Custom JavaScript.’ Name the variable as ‘Video Action’ and enter the code given for the variable creation and click on the ‘Save’ button.

function() {

var status = {{Video Status}};

switch (status) {

case ‘start’:

return ‘Play’;

case ‘pause’:

return ‘Pause’;

case ‘seek’:

return ‘Seeking’;

case ‘progress’:

return + {{Video Percent}} + ‘% Watched’;

case ‘complete’:

return ‘100% Watched’;

}

}

In the third step, navigate to ‘Tags’ click on ‘New’ and create a new tag. Select ‘Universal Analytics’ as the tag type and choose ‘Event’ as the track type. After this, you need to enter ‘Youtube’ as the Category and have to select a variable for Action. Select ‘Video Title’ as the variable for Label and select GA tracking ID for the tag.

video-track-in-gtm-custom-code

Now you to create a new trigger for your tag. So select ‘YouTube Video’ as the trigger type and enable all of the Capture options. Enter the percentage 25,50,75,100, and enable the option to ‘Add JavaScript API support.’

video-track-in-gtm-trigger-setup

The final step in setting the Video tracking event is to save the trigger and tag, submit the changes to your website. Now you will be tracking all of your embedded YouTube videos into Google Analytics. You will get an alert on users playing, pausing, watching 25%, 50%, 75%, and 100% of your videos.

Click Tracking

With the help of Click tracking, you can track almost everything if it’s not embedded in a frame, drawing from another domain.

Typically you can track click on:

  • ‘mailto:’ or ‘tel:’ links
  • Form submission button
  • Track multi-step form, & the next/continue button on these forms
  • Resources download such as PDF, spec sheets, brochures
  • Add to cart buttons
  • Order Place buttons

All you need for tracking these is a variable. To view these, you have to go to the preview function of Google Tag Manager, and as a backup plan, you can do it by inspecting the element with chrome dev tools.

To add the variable, find the trigger in the tag manager, you will have to enable those variables. You can do this by clicking ‘Variables’ on the left side, then click configure, scroll down to clicks and click on all the six boxes (click, element, classes, ID, target, URL, text).

Before we get into how to track these, set up the tags by using Event as track-type rather than Page View. This will add some additional fields available for you, which are specifically for tracking purposes. When you go into Google Analytics and go to events overview, you will have the option to break down the data by category, action, and label. So be Specific.

click-tracking-in-gtm

Here you can also enter these events as ‘Goals’ using the category, label, and action you choose. We recommend converting these events into goals. When you switch to goals, it becomes easy to see what goals are achieved and through where it come from. Let’s explore click tracking by what you are tracking.

Buttons

Enter the preview mode by clicking preview in Google Tag Manager. When you go to the website in preview mode and have Google Tag Assistant installed, then you will be able to see what tags are firing and the variables for every click. Set up a tag and associated event trigger.

Your trigger should be on ‘all elements,’ then set it up to work for some clicks. Select a unique variable; otherwise; you will track extra clicks that are not useful for you.

click-variable-in-gtm

Another way to track is to use CTRL=Click to open links in a new tab. By doing this, you will get the time to look at the variables for your gtm.click. Every time you click, you will see in the summary section that a gtm.click will come up. You can also find the info associated with that click.

Tracking Mailto:, tel:, and .pdf

These are easy to track, use the ‘Click URL’ variable. Set up a new tag, select Google Analytics, choose the track type as an event, run through that, override and fill your UA number. Then while setting up the trigger, you can select all the elements or the links. Now set the trigger to fire some clicks by click URL. If you want to track anyone that clicks any mailto:, tel: link, you just set up a tag and trigger for: click URL contains tel: and then one for mailto:.

In the case of .pdf, you can do the same thing. In analytics setup secondary dimensions in the reports that let you see the pages from where the click came, and the URL. Doe setting up in GTM, set up a unique tag, and trigger for each PDF click/download. If you want to track a specific PDF, you just need to set up a trigger as: Click URL, equals, and then enter the particular URL of PDF that you want to track.

Goal Tracking with Events

Event tracking with the Action, Category, and Event is a little bit tougher to perform in GA, as compared to Goal Tracking. Luckily, you can use Goal tracking, for that set that you are tracking an event, then enter the Category, Action, and Event, and then your events will be converted as goals or conversions.

This will make your goals easy to understand and attribute. It also has the advantage of importing into Google Ads if you are running any marketing campaign.

goal-tracking-in-google-analytics

These tracking elements will help you to track what aligns with the client’s goals. We can trace it back also to show the source of the traffic to show the clients that SEO or PPC efforts are working or not.

Element Visibility Trigger Made Simple in GTM

First create the new element visibility trigger, to do that follow these actions:

Navigate to trigger section in GoogleTag Manager, then click on the new button to create a trigger. Pick the trigger type as element visibility.

element-visibility-in-gtm

Now open your website’s contact form, fill out, and submit it. After submitting the thank you page will appear, inspect element by clicking right, look for the id or class of the div of the thank you message element. If you find the id associated with the div, copy it otherwise copy the class name.

Now go back to the element visibility trigger you created earlier and paste the ID into the element ID field. Fill the info needed in trigger:

element-visibility-trigger-setup

If the element doesn’t have an ID, then you will have to select the CSS selector from the selection method menu. Fill the class name in the element sector field that is div.form-confirmation.

Now Enter a name for the trigger and hit the save button. Now test whether the trigger loads when the element is visible.

element-visibility-working-on-gtm-side

Once the trigger loads, you can then create a new Universal Analytics event tag and send form submission data to analytics.

ga-side-element-visibility-working

Tracking pop up

Till now, we have understood the above tracking elements very well. Now you can track any aspect using this trigger. In order to track any pop-up element, all you need is to have an ID or class of the div. Using this, you can track all the pop-up forms, form field errors, and modals.

Wrapping it up

This comprehensive guide aims to make you understand what event tracking is as well as what leverage you can take from it.

Tell us what do you think of this guide. Was this helpful for you, or do you think event tracking is a great feature?

Feel free to reach us.

English
香港中文版 English
Scroll to Top