
May 8, 2025
What to do if Event Tracking in Google Tag Manager is not working?
Updated: May 8th, 2025.
Google Tag Manager empowers you to track various events on a website and then send that data to tools like Google Analytics 4, where you can analyze.
In many standard cases, you can track those interactions without the developer’s input. However, sometimes you get stuck when event tracking is not working.
I’ve noticed that some problems are more common than others when trying to help students of my courses and readers. This eventually has become a troubleshooting guide.
In today’s blog post, we’ll look at the most common issues why your event tracking in Google Tag Manager is not working.
By the way, if none of these tips fit your particular problem, let me know in the comments. Describe your problem as detailed as possible (with a link to screenshots), and I’ll try to help (and update the blog post accordingly).

Table of Contents
Here’s what you will learn in this article
- #1. Broken data layer
- #2. You haven’t created a trigger
- #3. Using the wrong trigger
- #4. Dealing with an iFrame?
- #6. dataLayer.push does not include the event key
- #7. Typos (+ case-sensitive)
- #8. Youtube trigger not working?
- #9. The tag is firing, but you can’t see the data in GA Realtime reports?
- #10. Don’t forget to publish your container
- #11. Using Element Visibility trigger and it’s not working?
- #12. A trigger with Click Element variable
- #13. Tags are “Still running” in the preview mode
- #14. Consent settings
- Final words
Video tutorial
Prefer video content? Here’s the video about this topic on my Youtube channel. But keep in mind that the blog post contains more details.
#1. Broken data layer
Event tracking in Google Tag Manager relies on the Data Layer. However, a careless configuration on your site might break it.
How can you know whether your site has a broken Data Layer? Enable Preview and Debug mode and then check the displayed events on the left side of the debug console.
Usually, you ALWAYS must see AT LEAST 5 events in the preview mode:
- Consent initialization
- Initialization
- Container Loaded
- DOM Ready
- Window Loaded
If, on the other hand, you see just the DOM Ready and Window Loaded, and instead of the Container Loaded, you see a mysterious Message, you have a problem.
If this is what you see, read this guide on how to fix the Data Layer.
#2. You haven’t created a trigger
This applies to the situations where you are trying to use the built-in triggers in GTM, like Just Links, All Element Clicks, or Form Submission (but not limited to).
Some GTM beginners enable the related variables (e.g., Click ID, Click Text, etc.) and hope they will start seeing Click events in the Preview and debug console. However, that is not enough.
You also need to have enabled a trigger to start seeing events in the preview mode (this applies to the built-in event-tracking functionality of GTM). So, if we are talking about the link click tracking, you need to complete both steps:
- Enable click-related variables
Have at least one Just Links trigger enabled on a page (any condition will work)
If you are interested in All clicks, have at least one enabled All Elements Clicks trigger, etc.
Once you have done that, refresh the Preview and Debug mode and then interact with the element. Now, you should see that event in the preview console.
#3. Using the wrong trigger
Sometimes, you might use the wrong trigger to track a particular interaction. Here are several examples.
#1. You are trying to track the clicks of an element with a Just Links trigger, but that element has no link.
You can inspect that element (Right Click on it > Inspect) and check whether <a> tags surround that element. If not, a Just Link Clicks trigger cannot help you track that element.
#2. Trying to use a Youtube Video trigger on a non-youtube video player
As the trigger name implies, it supports only Youtube video players. Read this guide if you are dealing with Vimeo, generic HTML5 player, etc..

#4. Dealing with an iFrame?
There’s a high probability that you are trying to track interactions of an element in the iframe. In a nutshell, iFrames allow embedding HTML documents on a site. That document can contain just a button, a video player, a reservation form, or even the entire website).
The contents of the iFrame can belong to your site but also can be hosted on a totally different domain.
Here’s the catch about iFrame tracking: even though you, as a website visitor, can interact with it (click, scroll, etc.), JavaScript on the parent page (including GTM) cannot “see” what is happening inside of that iFrame (unless you have access to the source code of what’s inside that iFrame).
Here’s a situation:
- You are working on mywebsite.com
- And there is a page on your site (mywebsite.com/contact) that contains a form (hosted originally on someotherwebsite.com)
- That form is embedded in an iFrame
- Your GTM container snippet is implemented only on mywebsite.com, and the iFrame does NOT allow you to add some custom code inside it.
If you are dealing with this situation, you are most likely out of luck and cannot track events within that iframe (there are some exceptions, though).
If, on the other hand, you (or your developers) can add some custom code inside that iframe, then you should read this guide.
After reading this chapter, your questions might be:
- How do I know if I’m dealing with an iFrame?
- How can I add my code inside that iFrame?
Let’s address them both.
#1. How do I know if I’m dealing with an iFrame? Right-click on the element that you are trying to track, and then in the Elements tab, climb up until you find the <iframe>
If you found it, that’s an iframe. If you haven’t, then the iframe isn’t the reason why event tracking in Google Tag Manager is not working.
#2. How can I know if I can add my code inside of that iFrame? Several options:
- Talk to your developers and ask if it’s possible
- If a 3rd party vendor offers that embedded iframe form (or whatever), contact their support and ask whether it is possible to place your custom JavaScript codes inside of it. If yes, then continue with this article. If not, you are out of luck (without JavaScript API).

<h2″>#5. Trying to use the built-in Form Submission trigger?
If you are trying to track a form on your website and using the built-in GTM Form Submission trigger, there are many reasons why it does not work. Read this blog post where I explain everything in greater detail (+ offer solutions)
#6. dataLayer.push does not include the event key
If you want to fire a tag on any dataLayer.push, that push must include an ‘event’ key, for example:
window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event' : 'form_submission' });
Then you could use a Custom Event trigger and activate your tag. If, on the other hand, the dataLayer.push does not include ‘event’, all you will see in the Preview mode is Message.
Even though it added some data to the Data Layer, you cannot use Message push as a trigger condition.
#7. Typos (+ case-sensitive)
A lot of things in Google Tag Manager are case-sensitive. For example, this means that productid ≠ productID. Keep that in mind when you create triggers. For example, you see a custom dataLayer.push where the ‘event’ key is ‘form_submission’:
window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event' : 'form_submission' });
If you created a custom event trigger like this:
…it would not work (because formSubmitted does not match with the event key).
Also, triple-check for typos. For example, if you want to access the attribute key in the dataLayer (I just made that example up), then make sure that you don’t skip any letter (and enter something like atribute (with one “t’)).
#8. Youtube trigger not working?
Are you trying to measure the engagement of your embedded Youtube video player but don’t see any video events in the GTM preview mode? You are not alone. There are many possible reasons why this is not working. I’ve posted another guide dedicated just to that problem.
#9. The tag is firing, but you can’t see the data in GA Realtime reports?
This also happens pretty often. Looking at the GTM preview mode, everything seems fine, right? The tag is firing exactly when you expect it to happen. However, that event is not visible when you go to Google Analytics 4 > Realtime. Why?
There are many possible reasons. To help you troubleshoot this, I posted a blog post some time ago.
And if you are not seeing events in the GA4 debug view, then read this.
#10. Don’t forget to publish your container
Once you have checked whether your events are correctly tracked, remember to publish the GTM container. While in the preview mode, you will see your data in GA properly. However, the rest of your website traffic still needs to be measured.
That’s because other visitors are not seeing the preview mode. So, you need to publish your container to implement your changes.
To do that, click SUBMIT in the top right corner of your GTM interface and follow all the necessary steps. After you do that, you will start seeing events coming in from all your website visitors.
#11. Using Element Visibility trigger and it’s not working?
If your setup is using an Element Visibility trigger and it does not fire, read this troubleshooting guide. Maybe you’ll get new ideas to verify.
#12. A trigger with Click Element variable
If you are trying to track clicks and the trigger uses “Click Element” variable with the “contains” operator, the trigger will not work. Click element is a special variable that requires advanced knowledge, and it works only with “Matches CSS selector” and “Does not match CSS selector”.
I wrote more about this issue here.
#13. Tags are “Still running” in the preview mode
Maybe your tags fire in the preview mode but they are displayed as “Still running”?
There are several possible reasons why this issue can happen and you will learn more about that in this guide.
#14. Consent settings
Cookie banners are also a factor to consider when troubleshooting event tracking. If consent is not given for a particular tracking purpose, GTM tags associated with that purpose should ideally be blocked from firing. This can be done by blocking triggers or using Consent Settings.
Go to Google Tag Manager > Select the tag that did not fire > Advanced Settings > Consent settings. Is there anything related to “Require additional consent”? If yes, then it means that if Google Consent Mode is implemented and its consent states are denied, your tag will be prevented from firing.
You can also check the consent states in the GTM preview mode’s Consent tab. If denied, they block your tag(s) from firing.
Is Event Tracking in Google Tag Manager still not working?
There are many more possible reasons why your event tracking is not working. However, I wanted to highlight the most common ones I face while helping my students.
If none of these tips helped you, let me know in the comments. Maybe I forgot something, or you are facing some new edge case that I should definitely include in the list?
Many of these tips are rookie mistakes. If you want to avoid them and get better with Google Tag Manager, consider downloading my free e-book for GTM beginners below.

10 COMMENTS
So, I am running into the opposite problem. When using Tag Manager Preview mode, I can see my event firing, and it appears in Goggle Analytics Real-time window. However, that realtime data is not being saved in "Behavior > Events > Overview" so my record of events only exists for the 30 minutes it is visible in the realtime window.
You need to wait for up to 24 hours to see data in Behavior > Events > Overview
Hi Julius,
I am facing one new challenge. I trying to track the event - download button clicks.
This event is firing successfully in preview mode, but it's not appearing in google analytics real time window or analytics not receiving any data of this event.
what can be the reason? kindly help me with the solution.
https://www.analyticsmania.com/post/google-analytics-real-time-reports-not-working/
Hi there,
Thanks for the article.
this concerns the Ecommerce tracking.
My site does not show a dataLayer at all. (when you click on view page source)
Therefore the tag does not fire as well.
Do you know what the problem might be causing?
Kind Regards,
Marloes
Hi, difficult to tell you specific reason without seeing the full setup.
Hi Julius,
Thanks for your informative blog.
I am set up a "reservation submit event" tag which is firing on GTM but events are not showing up on Google Analytics.
I checked everything, Javascripts are returning 42. I created page view event with the same settings, I am able to see those on GA but not "custom event" based events.
Do you know what might be the reason?
Difficult to tell without doing an audit of your setup
Hi Julius,
I have a data layer for Adobe Analytics where the data layer is in the window object such as window.customDataLayer and a custom event "pageView" is fired on which we get the data in customDataLayer . Can't we use the same custom event in GTM to access the data in customDataLayer? Is it mandatory to have the event within window.dataLayer as below?
window.dataLayer.push({
'event' : 'form_submission'
});
Hi! Our team has set up form_submit for Gravity Forms, some of them keep firing twice, and we can not figure out the issue. We have been told to toggle off the "Form Interaction" on the Data Stream settings, but that still isn't helping. Is there anything else we can look into that could potentially fix this issue?