Sunday, September 26, 2021
No menu items!
HomeData Analytics and VisualizationHow to track events with Google Tag Manager and Google Analytics

How to track events with Google Tag Manager and Google Analytics

Updated: June 2nd, 2021. Even though the title of this blog post does not mention Google Analytics, you probably already know that the GA will definitely play an important role here (if you have been following me at least for a while).

Without further ado, let’s take a closer look at what event tracking in Google Analytics is, why is it valuable and necessary, how to configure it with Google Tag Manager and troubleshoot, and many other things. The guide is going to be a long one but definitely valuable.

IMPORTANT: this blog post teaches how to track events with Universal Analytics. If you want to get familiar with event tracking in Google Analytics 4, you can also refer to this blog post.


 

Table of contents

+ Show table of contents +

Section 1: Introduction to Google Analytics Events

#1.1. The limitation of “out-of-the-box” Google Analytics
#1.2. What is event tracking in Google Analytics and why is it useful?

Section 2: How to Set Up Events in Google Tag Manager?
#2.1. The Plan
#2.2. GTM Event Tracking Example #1 – Outbound Links
#2.2.1. Generic link click trigger
#2.2.2. Enable built-in click Variables
#2.2.3. Update the trigger
#2.2.4. Create a tag
#2.2.5. Don’t forget to test

#2.3. GTM Event Tracking Example #2 – Document Link Clicks
#2.3.1. Create a trigger
#2.3.2. Create a tag

#2.4. Event Tracking Example #3 – Scroll tracking
#2.5. More GTM event tracking examples? Yes, please!

Section 3: Tracking custom events with Google Tag Manager
#3.1. Prepare a Data Layer Event Code
#3.2. Tell the developer when to activate this code when the registration is completed
#3.3. Test the event
#3.4. Configure Custom Event Trigger
#3.5. Configure Data Layer Variable
#3.6. Create a Universal Analytics Event Tag

Section 4: GTM Event Tracking Not Working?
#4.1. Data Layer is broken
#4.2. Auto-event listener is not enabled
#4.3. A built-in GTM trigger is not built to track ALL possible interactions
#4.4. You are trying to track interactions within the iFrame
#4.5. Other possible reasons why event tracking with GTM is not working

Final words

 

To save you some time

If you are already familiar with what Event Tracking in Google Analytics is and just want to learn how to set them up with Google Tag Manager, click the link below.

JUMP TO THE CHAPTER: how to configure event tracking with Google Tag Manager

If, on the other hand, you want to read everything, please proceed.

Again, a quick reminder: if you want to get familiar with event tracking in Google Analytics 4, you can also refer to this blog post.

 

Section 1:

Introduction to Google Analytics Events

The first large section of this tutorial has almost nothing with GTM. I understand that some readers of this blog post are just starting with GA so they might not be familiar with the event tracking concept.

In fact, you’re really just starting and you are not completely sure about the difference between Google Tag Manager and Google Analytics, here read this guide first.

 

#1.1. The limitation of “out-of-the-box” Google Analytics

Here’s a typical scenario. A fresh marketer is not very experienced with Google Analytics but wants to track what visitors are doing on his/her website. He/she signs up for Google Analytics account, gets some tracking code, and adds it to all pages.

Moments later they start seeing some data in their reports, with all these “wonderful metrics” like bounce rate, time on page, average session duration, etc. (P.S. I was sarcastic).

The problem with out-of-the-box Google Analytics is that it’s too generic. You cannot possibly expect it to adapt to your business nuances. That’s why you only get all these pageviews and try to do something with it.

You see, out-of-the-box Google Analytics tracks only pageviews (that changes with the new version of GA v2). It does not track clicks, form submissions, scrolling, and other interactions that might be valuable to better understand user behavior.

The problem in my example is that only one hit was tracked by GA — pageview. It does not matter whether you clicked some links or did other interactions. Out-of-the-box GA tracks only pageviews, hence session duration is 0 seconds.

If there were two pageviews (and the 2nd pageview was after 29 minutes), then the session duration would have been treated as a 29-minute-long session.

And in general, just by looking at page view data you cannot possibly know whether people are engaging with your content, submitting forms, etc. What if a person spent 10 minutes on a page, read the content, purchased a product but all you have is the default GA tracking?

In GA, you see that the session duration was 0 seconds
That visitor bounced

While in reality, the user did not bounce. In fact, he/she spent 10 minutes and purchased a product. Success!

And that’s where we move forward to Google Analytics event tracking.

 

#1.2. What is event tracking in Google Analytics and why is it useful?

Event tracking in Google Analytics enables you to track interactions beyond pageviews because admit it, usually, those other interactions are what actually matters.

Universal Analytics is not able to track events automatically (because they might differ on every site) and that’s where you (with Google Tag Manager) join the game. With GTM, you will be able to send event data to Google Analytics once a visitor completes a certain action.

And when those events are sent to GA, you’ll have a report like this:

Much better right? Instead of having some generic metrics like users, sessions, time on page, etc., you would now have a much better understanding of what’s actually happening on a website. Are visitors clicking certain links? Do they watch the video? Do they reach a certain part of the page?

Event tracking allows you to send event user-triggered interactions to Google Analytics. Every event can have 4 fields/data points:

Event Category (required)
Event Action (required)
Event Label (optional)
Value (optional)

Event Category is the broadest value and as you go deeper, they get narrower, for example:

Category – form
Action – newsletter subscription
Label – example.com/blog/article-title
Value – 5

If you open GA event reports, you will first see the Event Category (form). Let’s say that there are 50 events. Now you want to find out which exact forms were submitted. That’s where you click the Category and see the Event Action.

Maybe you have multiple forms (newsletter subscription, whitepaper download, etc.). If you want to go even deeper, you click on the Action in GA reports and then you will see URLs where those form submissions happened (or maybe you send some other info as an Event Label.

The Value field accepts only numbers and it represents the monetary value of that particular event to your business. In other words, what is the possible value of that particular event (e.g. maybe every new lead form submission is worth $5 for your business).

If you very new to Google Analytics event tracking, I highly recommend reading Chapter #4 in this blog post where you will learn the most optimal way of naming events in GA.


 

Section 2:

How to Set Up Event Tracking in Google Tag Manager?

I’ve actually split event tracking into two sections:

Section 2 is about tracking events with the standard GTM functionality (and will also mention some custom auto-event listeners that you can implement all by yourself)
Section 3 is about cooperating with a developer and asking him/her to push the event data to the Data Layer

 

#2.1. The Plan

Let’s start with a course of action. Every time you want to track events with built-in GTM functionality, these are the steps you must complete:

Have at least one trigger (of a particular type) enabled on a page (e.g. Just Links). After you do this, you will start seeing those events in Google Tag Manager’s Preview and Debug console
Enable related variables (e.g. if you want to track clicks, you’ll need Click Variables, like Click ID, Click Classes, etc.)
Update the trigger (to make it precise)
Create a tag (in our case, it’s Universal Analytics) and assign the trigger to that tag

 

#2.2. Google Tag Manager Event Tracking Example #1 – Outbound Links

A good way to learn something is to see a real-life example. Let’s start with the outbound link click. If you want to learn more about why such events are useful at all, read this guide. I’ll list more examples a bit later.

By default, Google Tag Manager does not track clicks. You can check that by enabling the Preview and Debug mode and refreshing the web page that you’re working on. You’ll see three events in the debug panel, Page View, DOM Ready, and Window Loaded.

Now, click any element on the page (not in the GTM debug panel) and see what happens on the left side of the panel. Nothing. You will still have those 3 events (unless, of course, you have implemented some other tracking functionality in your GTM container sometime before).

This happens because, by default, Google Tag Manager does not track clicks (or any other events), therefore, you need to configure them by yourself.

 

#2.2.1. Generic link click trigger

In Google Tag Manager, go to Triggers > Trigger Configuration > New > Just Links. Leave all the settings as they are and name the trigger All Link Clicks (or anything else).

Save it and refresh the preview and debug mode. Go to the page where you wish to track outbound links with Google Tag Manager. Click any link on a page.

If the link opens in the same browser tab, make sure that you click the link by holding CTRL or CMD keys on your keyboard (in order to open the link in the new tab). Why? Because if the page refreshes, the Preview and Debug mode resets as well, therefore, you won’t be able to check what click data is available once that click is captured by the GTM (unless you do this). And that will be very important in Step 2.

So once you have clicked the link, take a closer look at the Preview and Debug panel. You’ll see a new event, Link Click. That’s what our link click auto-event listener did. It was looking to link clicks on a page and once it spotted one, it pushed a gtm.linkClick event to the Data Layer and, therefore, it became visible in the debug console.

If you don’t see this event, make sure you have refreshed the Preview and Debug mode (by clicking the Refresh link in the orange banner of your GTM interface) and then refreshed the web page (that you’re working on) once again. The order is important here. Click the orange banner first, then refresh your website.

Thanks to this, we are able to see link click events in the P&D mode and inspect what data is available with each click.

Speaking of data, read the following chapter.

 

#2.2.2. Enable built-in click Variables

In order to create more precise triggers, we need yet another ingredient, variables. What are those?

They are little pieces of information that can be used both in Tags and Triggers (and, in fact, in other variables too). For example, Click ID. You can use it as a trigger condition (e.g. fire Google Analytics Event code when the ID of the clicked button equals “main-cta-button”).

Thanks to the GTM Preview and Debug mode we can see what variables are available at every event. Click the Link Click event on the left side of the preview mode and go to the Variables tab. Keep looking for anything related to clicks. If you’re working on a new container, you’ll probably won’t find anything.

Don’t worry, that’s expected. Now go to the Data Layer tab (while Link Click event is still selected). There, you’ll see some link-click-related parameters, like gtm.elementId or gtm.elementClasses, for example:

Even though the click data is tracked by Google Tag Manager, it is not available in the Variables tab of the P&D console. Why? Because built-in click variables are not enabled in the GTM interface by default. What does that mean? If some data is not available as a variable in GTM, you cannot use it in your triggers.

Let’s activate them.

In your GTM account, go to Variables and in the Built-in Variables section click Configure.

A panel will appear on the left side. Scroll down until you find click variables and enable ALL of them one-by-one.

After that, refresh the Preview and Debug mode, refresh the web page that you’re working on and click a link once again (if it opens in the same table, also hold the CTRL or CMD keys pressed while clicking).

Link Click event will appear in the event list of the P&D console, click it. Now go to the Variables tab and keep looking for click-related variables. Bingo!

 

#2.2.3. Update the trigger

The next step in this workflow is to update our trigger (to make it more precise). We want our tag to fire not on all clicks, but only those that are external (outbound).

What is an outbound link? Which variable in Google Tag Manager should we use as a part of the triggering condition? Let’s check the P&D console and see what we have.

Once you have the Preview and Debug console open, click any outbound link on a page and then click the Link Click event in the event stream (left side). Go to the Variables tab. Which variable should we use in order to distinguish an external link from an internal one?

The domain (Page hostname) of the current page is example.com (see the screenshot above). All the links (Click URL) are considered as internal if they also belong to the same domain as the page itself, therefore, all external links (Click URL) are the ones that do not belong to the example.com.

And this is exactly what we need to do: create a link click trigger that listens only to those clicks that do not belong to our website’s hostname (e.g. example.com).

Additionally, we need to exclude link clicks that are:

email links (e.g. [email protected])
phone numbers (e.g. +123456789)
Skype links (links that open Skype window)
links that do not redirect anywhere (they usually just display a popup or something like that). In GA reports, they might appear as javascript:void(0).

This can be avoided if we narrow down our trigger to track only those links that start with http. All outbound links start either with http or https.

Go to Google Tag Manager > Triggers and open the previously created “All link clicks” trigger. We’ll edit it to track only outbound link clicks. Rename it and change its settings like in the screenshot below (of course, replace example.com with the actual domain that your website belongs to):

Here’s a little explanation: what is an outbound link? It’s a link that does not belong to the domain of the current website. That’s why I’ve set the trigger to track all links of which hostname does not equal to “analyticsmania.com”. In your case, you should enter your domain there.

 

#2.2.4. Create a tag

Finally, let’s send outbound link clicks as events to Google Analytics. To do that, go to Tags (in your GTM interface) > Tag Configuration > Universal Analytics.

And enter the following settings:

In fact, you can enter anything that is meaningful to you in the Event CategoryEvent Action, and Event Label fields. The screenshot above is just for the demonstration purpose. But I like to follow the convention that is displayed above.

If you don’t have any Google Analytics Settings Variable in the container yet, create one by clicking the drop-down list and choosing New Variable.

If you want to use other GA features, like custom dimensions, cross-domain tracking, you’ll need to do additional configuration in the GA Settings Variable.

With GA Settings Variable you’ll be able to reuse the same GA settings in multiple Google Analytics tags. Each GA tag requires a Tracking ID and, optionally, other settings to configure. Once you have 20, 50, or even more Google Analytics Tags, the management on the individual level becomes unbearable.

That’s where the GA Settings Variables saves the day: after you make a single change in the variable, all the tags that are using the variable will automatically inherit the change.

After you entered all the necessary information in the GA Event Tag, assign the trigger that we’ve created previously. Like in the screenshot below.

 

#2.2.5. Don’t forget to test

Enable (or refresh) the Preview and Debug mode, go to your website and refresh the page. Here are scenarios you should test:

Click an internal link (e.g. the one that opens a “Contact us” page). The outbound link GA tag must not fire.
Click an email link, if you have one (that’s one of those links that are added to your website, e.g. in “Contacts” page). The GA Event tag should not fire.
Click an external (outbound) link. The GA Tag must fire. If the tag did not fire, click it in the P&D mode.

and scroll down to Firing triggers section and check if all the conditions were not met (marked with a red X).
Then check GA real-time event reports and see if you are getting the data.
In Google Analytics, go to Realtime > Events, and you should see the click data you’ve just tracked with GTM.

If, for some reason, you don’t see the data in Google Analytics real-time reports, read this guide.

If you want to see where this data lands in Google Analytics standard reports, go to this article.

 

#2.3. GTM Event Tracking Example #2 – Document Link Clicks

With this example, I’ll be much quicker. The principle is the same as it was with the outbound links (so I will not go into details once again). Plus, part of the job is already complete:

We don’t need to create a generic link click trigger (to start seeing Link Click events in the preview mode)  because we already have the link click auto-event listener running in the background thanks to the outbound link click tracking implementation.
All Click Variables are already enabled.

What we’ll need to do is to create a different trigger that will track only document link clicks (like Word or PDF files) and then create another GA Event tag that will send that event data to Universal Analytics.

 

#2.3.1. Create a trigger

In Google Tag Manager interface, go to Triggers > New > Just Links and enter the following conditions:

Some Link Clicks
Click URL Matches RegEx (ignore case) .(pdf|docx?|xlsx?|pptx?|zip|rar|tgz|mp3|odt)

With this condition, the trigger will be activated if the clicked URL contains any of the following extensions (e.g. .pdf or doc). I used here the most common file extensions from my experience but you can add more if you want. Just before the closing parentheses, add a pipe (“|”) and add another extension, e.g. exe. Then the result would be .(pdf|docx?|xlsx?|pptx?|zip|rar|tgz|mp3|odt|exe)

 

#2.3.2. Create a tag

And here is a tag that would send the event to Google Analytics.

If you want to track not the full URL of the file, but just the name and its extension, read this guide.

You could actually make things even cooler by tracking more information about the clicked document. For example, an interesting data point would be the “topic of the document”. Then you could pass that topic as an Event Action and would know which topics are the most interesting for your users/visitors. This is possible with the tracking of “data-*” attributes.

Assign the trigger to the tag and save everything. Don’t forget to test the events with GA real-time reports!

 

#2.4. Event Tracking Example #3 – Scroll tracking

In recent months, I have been more skeptical of scroll event tracking and its benefits (and reading this article confirmed that even more). However, if you don’t operate large volumes of traffic (to reach the threshold of monthly hits sent to GA for free), it should not do a lot of harm to you much.

The drill is, once again, quite similar to the ones that you saw before. This time, we don’t need to create a generic scroll trigger but we need to enable scroll variables. So go to Variables > Configure > Click checkboxes next to scroll variables (usually I use just Scroll Depth Threshold but for some mystical reason, I still enable all of them).

Then create a Scroll trigger in GTM with the following settings (you change the percentage values to whatever you prefer):

Last but not least, GA Event Tag. Here are its settings.

Notice anything unusual? I’ve set the non-interaction hit field to true. Why did we do that? Because we do not want to scroll events to affect the bounce rate. Even though the bounce rate as a metric is not too valuable, it sometimes may give us a bit of additional context (if your setup is correct).

Let’s remember when is a session considered as bounced in GA. If a session consists only of one hit (e.g. pageview or event), then it’s a bounce. If there are two or more hits, that is not a bounce.

Imagine a situation. A visitor lands on your website, scrolls past the 50% mark of the page height and leaves after 5 seconds (without doing anything).

Should such a session be counted as a bounce or as a session with interaction (the only interaction that was done here is scrolling)? I think that should be a bounce. Because a visitor did nothing meaningful on that page.

So with this non-interaction hit parameter, we are instructing Google Analytics to track the event but not treat it as an interaction.

I’ve seen some marketers “adjusting” bounce rate just to make things look prettier (e.g. if a person scrolls 50% or more, that should decrease a bounce rate). But if you take a look at the aforementioned example, 50% does not mean a thing. So if you want to track scrolling, that’s fine. But you should not treat those events as interactions and affect the bounce rate.

I mean, there is even a chance that a cat will move the mouse, accidentally scroll down and some marketers will treat this as a good session

Assign the scroll trigger to the Universal Analytics Event Tag. Once you save it, don’t forget to test.

Warning: non-interaction hits can be seen in GA real-time reports only if you switch to the Events (Last 30 min) 

 

#2.5. More GTM event tracking examples? Yes, please!

And there are many more examples of how can you track events with Google Tag Manager. I don’t want to turn this blog post into a 20,000-word behemoth, so I’ll just give you some links. You can decide which ones do you need:

Video tracking
Button click tracking
Form submission tracking
Track comments
Track when someone translates your page
Affiliate link click tracking
Combine multiple events and if all of them occur on a page — only then send an event to GA

And these are just several examples of what can be done. In fact, I’ve created a guide – 99 things you can do with Google Tag Manager (and this goes even beyond the event tracking).

 

Section 3:

Tracking custom events with Google Tag Manager

What if you cannot find a solution on how to track a certain event with GTM? Built-in variables are not useful and there is no ready-made solution offered by someone else (like GTM recipes).

You can always rely on developers. What they need to do is to push the event information to the Data Layer once that particular interaction occurs. After that, you will be able to catch the needed information with GTM and send the event further to Google Analytics.

If you prefer video content, you might want to take a look at this tutorial.

 

#3.1. Prepare a Data Layer Event Code

As an example, let’s say that we want to track successful registrations on a website. You could give the following code to a developer:

<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
‘event’: ‘registrationComplete’
});
</script>

Once this code is successfully implemented by a developer, you will start seeing it in the GTM Preview and Debug console. If you want to get some additional data, include it in the dataLayer.push() code:

<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
‘event’: ‘registrationComplete’
‘plan’: ‘premium’ // the name of a pricing plan
});
</script>

 

#3.2. Tell the developer when to activate this code when the registration is completed

Another important step is to explain to the developer WHEN you want the dataLayer.push event to fire. If you’re interested in the tracking of a specific form, Data Layer event must be fired after the successful submission occurs.

 

#3.3. Test the event

After a developer says that his/her task is complete, enable GTM Preview and Debug mode to test it. Complete that specific interaction (e.g. submit the form) and keep looking for the Data Layer event in Preview and Debug mode’s event stream. It should look like this:

 

#3.4. Configure Custom Event Trigger

By default, Data Layer events do not appear in the Google Tag Manager as triggers. You need to do that manually. Since we are interested in tracking successful registrations, we need to instruct GTM that registrationComplete events are important to us and we wish to use them as triggers.

In Google Tag Manager, go to Triggers and hit New button. Choose Custom Event as trigger type and enter the following settings:

Done. You have just created a Google Tag Manager Custom Event Trigger. If you also wish to use registrationCountry and plan as variables in your Google Tag Manager tags, read the guide on how to access data in the Data Layer and turn them into GTM variables.

 

#3.5. Configure Data Layer Variable

If you want to send some custom data together with the event (and that custom data is present in the Data Layer), you can access that information with help of Data Layer Variable.

To continue our example, let’s access the plan key from the Data Layer. In GTM, go to Variables > New > Data Layer Variable.

We entered “plan” because that’s the name of the key in the Data Layer (when the registrationComplete event is pushed to the DL)

 

#3.6. Create a Universal Analytics Event Tag

Now, let’s create a GA event tag that will send the event data to Google Analytics every time a registrationComplete is pushed to the Data Layer). In GTM, go to Tags > New > Universal Analytics. Enter the following settings:

That’s it! Don’t forget to test the event by going to Real-time GA reports!

 

 

Section 4:

Google Tag Manager Event Tracking Not Working?

Looks exciting, right? All these possibilities of things you can track! However, not always things go easy and sometimes obstacles may occur. But don’t worry, here are the most common issues that I’ve noticed when someone says that event tracking is not working for them.

 

#4.1. Data Layer is broken

Even if you have configured Google Tag Manager event tracking properly, some other fundamental problem might break it. According to GTM’s official documentation, if a developer wants to configure dataLayer before GTM container is loaded, he/she should place the following code above GTM container snippet:

<script>
dataLayer = [];
</script>

(Actually, this code should never be used and it’s always better to use .push() but let’s just pretend that I haven’t said that).

Unfortunately, some developers place it below the GTM container snippet thus break the Data Layer. As a result, no further events will be visible in the Preview and Debug mode and you won’t be able to fire tags in GTM based on user interactions.

Read more about this here

 

 

#4.2. Auto-event listener is not enabled

Sometimes people accidentally skip the step where they have to create a trigger in GTM in order to start seeing events in the Preview and Debug mode. They just enable Click Variables and hope that this will start showing Link click or Click events in the preview and debug mode.

Unfortunately, it won’t. So make sure that you also enable the trigger itself.

 

#4.3. A built-in GTM trigger is not built to track ALL possible website interactions

While GTM already has a bunch of triggers like click, element visibility, Youtube, etc., they do not cover all the possible scenarios. For example, Youtube trigger does not support some other embedded players on a site. So if you are dealing with such a situation, try to use Google Search and find a custom tracking solution.

I know, this sounds pretty obvious, but really — just google it. Find out what video player is embedded on a site and try to search whether someone is offering a solution for that. In fact, many video players can be tracked with GTM by using a custom solution.

 

#4.4. You are trying to track interactions within the iFrame

In a nutshell, iFrames enable developers to embed one HTML document within another. For example, the entire page can be embedded in another one. A video player can be embedded on another page. While this might sound exciting for regular mortal non-technical users, from a tracking perspective, this is a nightmare.

If something is embedded on a page, you cannot track what’s happening within the iFrame unless:

You have direct access to iFrame’s internal code (in many cases, you won’t)
Or the iFrame provides a certain mechanism of how to track it (a.k.a. JavaScript API). In most cases, JavaScript APIs are not available. But sometimes you might be lucky.

So if, for example, you are trying to track clicks of certain elements but no events are displayed in the Preview and Debug mode, chances are that you are dealing with the iFrame. One of the ways how to find that out is to do the right-click somewhere near that element that you want to track. If you see View frame source (at least on Google Chrome), this means that you are working with an iFrame and regular Google Tag Manager event tracking will not work.

The other option to check it is to use Inspect Element feature of your browser.

Solutions?

Either you need to find the access to add tracking code to the inside of the iFrame (if you’re working with a 3rd party vendor’s iframe, the chances of success are quite low)
Or to use Google and find — maybe someone has written a guide about it. For example, the Disqus comments widget is using iFrame. Even though you cannot place your tracking codes within the frame, there is another solution mentioned here.

 

#4.5. Other possible reasons why event tracking with GTM is not working

Here are several more resources that you might find useful?

Youtube trigger in GTM is not working
Why don’t GTM listeners work?

 

Final Words

Phew! The initial idea was to write a much shorter blog post but this topic is just too large to fit in a couple of thousands of words (or less). To sum up:

Google Analytics events greatly extend the capability of the tool. Just by looking at pageview data you cannot possibly draw some valuable insights (just remember my example of a person who visited for 10 minutes, purchased but your out-of-the-box GA just showed a bounce).
Google Tag Manager is a great tool that allows you to send events to GA or any other web tracking too. The built-in functionality covers a lot of interactions that can be captured (clicks, element appearances, Youtube video interactions).
But there are still many interactions that require custom solutions. One of them is to find guides that utilize custom auto-event listeners (e.g. DISQUS comments can be tracked with them
If none of the above solutions helped, cooperate with a developer. Ask him/her to push the interaction and its data to the Data Layer, then use Custom Event Trigger + Data Layer Variable and send the event to Google Analytics. In our example, we sent the info of successful registration.
This guide definitely does not cover all the possible scenarios. If you are interested, here’s how you can track forms, affiliate links, video players, etc.

Got questions? Post them below. Subscribe to the newsletter below and get relevant GTM tips to your inbox.

 

 

The post How to track events with Google Tag Manager and Google Analytics appeared first on Analytics Mania.

Read MoreAnalytics Mania

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments