Ever published a new tag in Google Tag Manager (GTM), crossed your fingers… and then nothing happened?
You’re not alone.
Debugging in GTM is one of the most crucial (and often overlooked) parts of any tracking setup. Fortunately, GTM’s Preview Mode and Google Tag Assistant make it easier than ever to figure out what’s working and what’s not.
In this post, I’ll walk you through exactly how to use these tools to debug GTM like a pro.
What Is GTM Debugging (and Why It Matters)
Debugging in GTM is the process of testing whether your tags, triggers, and variables work as expected before they go live. Whether you’re firing events to GA4, tracking conversions for Google Ads, or sending data to Meta, debugging helps you:
- Ensure accuracy
- Avoid duplicate tracking
- Catch broken or misfired tags
- Save time and budget
Let’s dig into how to do that using GTM’s built-in tools.
How to Use GTM Preview Mode
Step 1: Enter Preview Mode
- Open your GTM container.
- Click the “Preview” button in the top-right corner.
- Enter your website URL.
- Hit “Connect.”
GTM will open your site in a new window, and a debug panel will appear at the bottom of your screen. This is where the magic happens.
Pro Tip: If Preview Mode doesn’t connect, double-check your GTM container is published and installed correctly on the site.
Step 2: Navigate and Interact
- Click around your site like a normal visitor.
- Trigger events (e.g., button clicks, form submissions).
- Watch the debug panel update in real-time.
How to Use Google Tag Assistant (Tag Assistant Companion)
Google Tag Assistant helps you validate your GTM setup and connects directly with Preview Mode.
How to Set It Up
- Install the Tag Assistant Companion Chrome extension.
- Open Preview Mode in GTM.
- Tag Assistant will launch and connect your debug session.
Tag Assistant shows what tags are firing, when, and why—giving you a second layer of insight beyond the GTM panel alone.
Common Debugging Scenarios (and How to Fix Them)
✅ My Tag Isn’t Firing
- Check if the right trigger is assigned.
- Make sure your conditions (click classes, URLs, etc.) match exactly.
- Verify the tag is published in the current container version.
✅ Tag Fires on the Wrong Page
- Double-check the trigger conditions.
- Use built-in filters like “Page Path” or “Click Text” to refine targeting.
✅ Variable Shows ‘undefined’
- Make sure the variable is enabled in GTM.
- If using a data layer variable, confirm the
dataLayer.push()
occurs before the tag fires.
✅ GA4 Tag Fires but Event Parameters Are Missing
- Review the tag configuration.
- Double-check spelling and capitalization of event parameter names.
Debugging may not be the flashiest part of GTM, but it’s easily one of the most important. With Preview Mode and Tag Assistant, you have everything you need to troubleshoot like a pro no guesswork required.