Analytics - Tag Manager

Solved:  Why Google Tag Manager Events Are Not Showing In Analytics

By on 26th March 2023

Reading Time: 9 minutes

  • LinkedIn
  • Twitter
Why Google Tag Manager Events Are Not Showing In Analytics

Google Tag Manager events not showing in Analytics is a common issue experienced by many website owners. In this situation, the events that are set up in Google Tag Manager do not appear in the Analytics reports. This can be frustrating as it hinders the ability to track and analyze user interactions accurately. There are several potential reasons for this problem. One possibility is that the event tags are not properly configured in Google Tag Manager, leading to the events not being triggered and recorded in Analytics. Another reason could be that there is a delay in data processing, and it may take some time for the events to show up in the reports. Additionally, if there are any filters or data sampling applied in Analytics, it could affect the visibility of the events. To resolve this issue, it is recommended to double-check the event tag setup in Google Tag Manager, ensure that the tags are firing correctly, and review any filters or settings in Analytics that might be causing the events to be hidden. By troubleshooting these potential causes, website owners can gain accurate insights into user behavior and make informed decisions based on reliable data.

I recently worked on a Google Tag Manager (GTM) and Google Analytics 4 (GA4) configuration project for a new website product launch.   This was across two subdomains on the same top level domain, both of which already had GTM tags with a GA4 basic page view tag set up, along with a number of Universal Analytics events.

Everything was working fine and had been since they were initially set up.

The aim of the project was to set up custom events and conversions that would demonstrate a user landing on the main site, then clicking through to the subdomain to follow a sign up process through to completion.

The main site is WordPress, and the subdomain is a bespoke custom site built using React so was essentially an SPA architecture, where all content is loaded on a single page and dynamically updated as needed.

This shouldn’t be an issue though for GTM, you can use History change based triggers to detect when a user moves from URL to URL.

Initially I was working on a test environment before the new content and functions were rolled out to the live site ahead of the product launch.

In both cases, the events were set up, and all was working as I tested the events through to conversion I could see them firing correctly and being tracked as events in GA4.

However, when the pages went live and users were accessing the pages, nothing was being tracked.

I initially thought it might be a JS or SPA related issue, but no matter how many times I tried and tested different ways of tracking a user, whilst everything worked ok for me, nothing was tracking for any other user.

Ultimately, I had to ask myself some basic questions to try and get to the bottom of it, which I eventually did.

TLDR

If you can’t see events you’ve created in GTM appearing in GA4 you more than likely to find that your account does not have publish permissions

How do I make sure my tags and triggers are set up correctly in Tag Manager?

When you have created you’re tags and triggers, use the preview and debug mode to test your tag and trigger setup. This feature allows you to test your setup in a staging environment before pushing it live. It will also provide you with information on what tags are firing and not firing, and what errors might be occurring.

Once you’ve set up the tags and triggers such as:

tags and triggers

You then launch preview mode:

Preview

From here, after you have launched you’re site, you can see a tab for the tag assistant.

What is the Google Tag Assistant Extension?

The Google Tag Assistant extension is a helpful tool developed by Google to assist website owners in verifying and troubleshooting tracking codes on their websites. This extension, available for Google Chrome, allows users to easily track whether Google tags are correctly implemented on a webpage. With just a few clicks, website owners can confirm if Google Analytics, Google Ads Conversion Tracking, and other tags are firing correctly. The Google Tag Assistant extension not only saves time but also ensures accurate data collection, enhancing the overall performance of online advertising campaigns.

You can see a summary of all the tags that have fired on a page as well as clicking default and custom events to see what fires when:

tag assistant tags

The state of any default and custom variables after any default of custom events have fired:

tag assitant variables

And the current state of the data layer:

DOM Ready

From the above on my home page, I can see that a page view has fired, a linkedin pixel and some custom scripts I use.

One GA4 event I have set up is to detect when a user has clicked on a specific section of links on my home page.

So, when I click on such a link, I see the following in tag manager to show as and when it fired:

Link Click

You can then also click on the tag to see how/why it fired and what variables were passed:

tag property

This is all firing as expected, so now to check it’s tracking into GA4

How do I view Google Tag Manager events in Google Analytics?

There are two ways to do this, real time tracking and debug view

What is real time tracking in GA4?

Real-time tracking in Google Analytics 4 (GA4) is a feature that allows you to see the data from your website or app as it happens, in real-time. This means that you can view user behaviour and interactions on your site or app as they occur, without having to wait for the data to be processed and analysed.

To access real time reports, click “Realtime” in the reports menu:

real time tracking

Here you can see the events that are occurring on your site, such as my home page link click event:

home page link click event

So far, so good.

What is GA4 Debug View?

The GA4 Debug View is a valuable tool that provides developers with essential insights into the functioning and performance of their code. This debug view specifically caters to the Google Analytics 4 (GA4) platform, enabling programmers to monitor and track data collection and event tagging processes accurately. By utilizing the GA4 Debug View, developers can identify and rectify any issues or discrepancies in their analytics implementation, ensuring that data is gathered correctly and enhances the overall user experience. With its user-friendly interface and comprehensive features, the GA4 Debug View has become an indispensable asset for programmers seeking to optimize their Google Analytics integration.

To access this, go to “Debug View” in your GA4 property menu:

property menu

Where like real time tracking, you can see events that are firing, but the difference is that you only see data sent from users visiting the site in debug mode only.  So basically you, when you’ve access the site via GTM and is why this URL parameter is appended when you launch the site in preview mode:

https://organicdigital.co/?gtm_debug=1679854325388

you will then see what fires when in debug view:

debug view

Again, everything is working fine, and this was the case on the recent project.

Which led me to ask myself the next question:

What could be the reasons for my events not showing in Google Analytics?

After much googling (and a spot of binging), I found myself with two possible answers.

The first is quite technical:

The ga() Method Has Been Hijacked

This refers to a situation where the ga() method, which is the JavaScript function used to send data to Google Analytics, has been modified or replaced by another script or piece of code.

When the ga() method is hijacked, it means that the data sent to Google Analytics is being intercepted and possibly manipulated before it is sent to Google Analytics servers. This can result in inaccurate or incomplete data being collected, which can affect the accuracy of your Google Analytics reports.

There are several ways in which the ga() method can be hijacked. For example, a third-party script or browser extension may be modifying the ga() method, or a malicious attacker may have injected malicious code into your website that modifies the ga() method.

To find out more about how to diagnose this issue, these were the articles I found, here:

https://www.analyticsmania.com/post/event-tracking-in-google-tag-manager-is-not-working/#hijacked-ga

and here:

https://www.simoahava.com/analytics/still-running-google-tag-manager-tags/#2-the-ga-method-is-hijacked-by-some-other-code-running-on-the-site

whilst the site config on the JS generated site did demonstrate similar behaviour to what is described in those articles, I noticed some other things going on that suggested going down the technical JS issue route was a case of not seeing the woods for the trees.  It felt like a school boy error.

You Have Not Been Assigned Publish Permissions

When I was added to the GTM account, I had been added with approval permissions, and not full admin able to publish.

user permissions

FFS

In my defence, to date, I’ve always been added as an admin user with full permissions  it’s really not obvious when using GTM if you have been assigned Publish or Approval permissions, but, this will make all the difference as to whether changes go live when you click the publish button.

To explain further:

What are the user roles in GTM?

There are 2 roles as follows:

User: A user in GTM has read-only access to the containers in the account. They can view all tags, triggers, and variables, as well as see the current state of the container version. However, they cannot make any changes or modifications to the container or its contents.

Administrator: An administrator in GTM has full access to all containers within an account. They can add, edit, and remove users, as well as grant or revoke access to containers. Administrators can also create and publish container versions, manage tags, triggers, and variables, and modify container settings.

What are the user permission levels in Google Tag Manager?

Further to the above, aside from full administrator access, there are 5 permission levels as follows:

No Access: Users with No Access cannot access the account or any containers within the account.

View: Users with View access can view container contents and tracking information, but cannot make any changes or modifications to the container or its contents.

Edit: Users with Edit access can make changes and modifications to containers, as well as create, modify, and publish container versions. They cannot manage users or change user access to the account or containers.

Approve: Users with Approve access can review and approve container versions, as well as publish them to the live environment. They cannot create or modify container versions, manage users, or change user access to the account or containers.

Manage: Users with Manage access have full access to all containers within an account. They can add, edit, and remove users, as well as grant or revoke access to containers. They can also create and publish container versions, manage tags, triggers, and variables, and modify container settings.

The confusion came when I was adding tags and triggers and click “publish”, because that makes me think the changes will be published. In full admin mode, when you commit changes the UI is as follows:

submit button

In approval mode, it looks like this:

submit button

You’d think they’d amend to button to read “submit for approval” or similar.

The other give away was when looking at version history, you can see every time I clicked submit the version was updated, however, the live version was still the same one that was in place when I started working on the project:

version history

Fair to say, even after several years of working with GTM, every day is a school day.

I hope this helps you with an similar issues you are facing, but if not or you are having trouble with any of the aspects of GTM mentioned in this post, please feel free to get in touch using the contact form below.

Get In Touch

Fill in the form below if you want to enhance your website's organic visibility