How to check if Google Tag Manager is Working – Testing GTM

In this article, I will talk about how to check if Google Tag Manager (GTM) is working. We will go through different ways to test that GTM is working.

Check the source code of the website

The first method to check if Google Tag Manager is working or not is by identifying the GTM container code in the website’s source code. 

GTM container code is made up of two parts. The first part should always be placed after the opening <head> tag, and the second part should be placed just after the opening <body> tag. 

Follow the below steps to know more:

Step-1: Navigate to your website’s home page.

Step-2: Right-click anywhere on the page background and select ‘View Page Source’. Alternatively, you can also press ‘Ctrl + U’ to do the same thing.

right click and select view page source

A new window will open like the below, showing the page’s source code.

source code

 Step-3: Now press ‘Ctrl + F’, which will open the find function in the right upper corner.

find function

Step-4: In the find function’s text box, type ‘gtm.js’ and press ‘Enter’. 

If you have implemented the GTM container code correctly, you should be able to verify its instance under the <head> tag, like the below image:

gtm container code under head tag

Step-5: Now, in the input box of the find function, type ‘Google Tag Manager (noscript)’ and press ‘Enter’. This is the second part of the GTM container code and should be placed just after opening the <body> tag. 

If you have implemented it correctly, you should be able to find its instance after opening the <body> tag like the below image.

check if Google Tag Manager is Working

Check using Google Tag Manager’s preview and debug mode

The second method to check if Google Tag Manager is working or not is by using the preview and debug mode. 

Through the Google Tag Manager preview and debug console window, you can make sure that your GTM container is loading correctly and that you can test tags, triggers, variables, and data layers as expected.

Follow the below steps to know more:

Step-1: To enable preview mode, log in to your GTM account and click on the ‘Preview’ button in the upper right-hand corner.

preview 1

Step-2: A new window will open with Google preview mode. Add the URL of your website where external links are present and click on ‘Start’.

add url and click on start 1

Step-3: Another new window will open with the specified URL. Navigate back to the preview window of Google Tag Manager, and there you will see the success message which states ‘Connected!’ once the preview mode is enabled for the URL. Click on ‘Continue’.

status

Step-4: If you have implemented the GTM container correctly, you should see the below screen with status connected, browser events, and tags fired.

GTM status connected

Additionally, on the page where the Google Tag Manager debug mode is enabled, you will see the notification which shows that the debugger is connected.

debugger connected

If you want to know more, you can visit: GTM (Google Tag Manager) Debugger Console Tutorial

Do you want expert help in setting up/fixing GA4 and GTM?

If you are not sure whether your GA4 property is setup correctly or you want expert help migrating to GA4 then contact us. We can fix your website tracking issues.

Check using Google Tag Assistant

The third method to check if Google Tag Manager is working or not uses the Google Tag Assistant Chrome extension. Google Tag Assistant is used to identify, validate and troubleshoot the installation of Google Tag Manager and various Google tags on a web page.

Once you have installed the Google Tag Assistant Chrome extension, you need to enable it before you can use it on a web page.

Follow the below steps to know more:

Step-1: Navigate to your website’s home page.

Step-2: Locate and click on the Google Tag Assistant icon on the top right-hand side next to the browser address bar. 

tag assistant

Step-3: Click on the ‘Enable’ button and refresh the web page.

enable button on tag assistant

Step-4: After refreshing the page, click on the Tag Assistant icon again, and you should see the status of your Google Tag Manager container in green.

tag manager status green

Check if the GTM script is running in Chrome’s developer console

The fourth method to check if Google Tag Manager is working is by checking the GTM script running in the ‘Elements’ tab of Chrome’s developer console.

Follow the below steps to know more:

Step-1: Navigate to your website’s home page.

Step-2: Right-click anywhere on the page background and select ‘Inspect’.

inspect

Step-3: This will open the developer console window at the bottom of a web page. 

console

Step-4: Click on the ‘Elements’ tab and press ‘Ctrl + F’, which will open the find function at the bottom of the window.

elements tab

Step-5: In the find function text box, type ‘gtm’ and press ‘Enter’. If you have implemented the GTM container code correctly, you should be able to verify its instance like below.

GTM script in elements tab

Check Chrome’s developer console in the network tab

The fifth method to check if Google Tag Manager is working is by checking the GTM script running in the ‘Network’ tab of the developer console. 

The main use of the ‘Network’ tab is to validate server calls and sent parameters. You can see every server call made, like GTM call, analytics events, and pageview sent to the server.

Follow the below steps to know more:

Step-1: Navigate to your website’s home page.

Step-2: Right-click anywhere on the page background and select ‘Inspect’.

inspect

Step-3: This will open the developer console window at the bottom of a web page. 

console

Step-4: Go to the ‘Network’ tab in the console. You will see a screen like the one below.

network tab

Step-5: Select the checkboxes named ‘’Disable Cache’ and ‘Preserve log’.

disable cache

Step-6: Type ‘gtm’ in the filter on the left-hand side and refresh the page.

type gtm

Step-7: Once you refresh the page, you should be able to see something like ‘gtm.js?id=GTM-AAAA’

GTM-AAAA is the container code ID example that I am using here as an example. You should see your actual GTM container code here. 

The status code for this server call should be 200, which means your Google Tag Manager is working fine.

network call

Check using Google Analytics real-time reports

The sixth method to check if Google Tag Manager is working is by checking the real-time reports in Google Analytics. 

If you use only Google Tag Manager for your analytics implementations and send events and pageviews, you can check the real-time reporting. 

If there are any issues with your Google Tag Manager, the real-time reports will not show any active users. But if it is working perfectly fine, you can see the users and their activities on the website in real-time.

Follow the below steps to know more:

Step-1: Navigate to your Google Analytics account.

Step-2: Click on ‘Realtime’ from the menu on the left-hand side.

real time 1

Step-3: Now click on ‘Overview’.

overview

Step-4: You shall be able to see the real-time users and their activities on the website, which means your Google Tag Manager is working fine.

realtime report

Frequently asked questions about how to check if Google Tag Manager is working – testing GTM

How long does it take to check if Google Tag Manager is working?

It could take anywhere from a few minutes to a few hours to troubleshoot a Google Tag Manager issue, depending on your skillset and experience.

Which tools are used for debugging Google Tag Manager issues?

Google Tag Assistant and Google Chrome browser’s developer console are the most commonly used tools to identify, validate and troubleshoot the installation of Google Tag Manager. Both tools are free for use.

How do I know if Google Tag Manager is working?

To check if Google Tag Manager is working, you can use any of the below methods:

1. Check the website’s source code by right-clicking on any of the web pages and selecting ‘View page source’, then find the GTM container code. If it is present, that means Google Tag Manager is working.
2. Use Google Tag manager’s preview and debug mode. If the preview window displays the message ‘connected,’ your Google Tag Manager is working.
3. Use the Google Tag Assistant Chrome extension and check if it shows GTM container code on page refresh.
4. Check if the Google Tag Manager script runs in Chrome’s developer console in the ‘Elements” Tab. Press ‘Ctrl + F’ and find ‘gtm’. If you see the gtm script, that means it’s working fine
5. Check Chrome’s developer console in the network tab. In the filter, type ‘gtm.js’ and refresh the page. If you see the gtm.js in the server call list with 200 as the status code, your Google Tag Manager is working.
6. Check using Google Analytics real-time reports. If there are active users on the website reflected in the real-time reports, that means your Google Tag Manager is working.

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade