Google Tag Manager

⌘K
  1. Home
  2. Google Tag Manager
  3. Google Tag Manager Tracki...
  4. Previewing and Debugging in Google Tag Manager

Previewing and Debugging in Google Tag Manager

Why Preview Mode Is Important:

Before publishing, always test your setup to make sure:

  • Tags are firing correctly
  • Triggers are activating under the right conditions
  • Variables are capturing the correct values

Step 1: Open Preview Mode in GTM

  1. Go to https://tagmanager.google.com
  2. Select your container
  3. In the top-right corner, click the Preview button

Step 2: Connect Your Website

  1. A new window/tab opens: Tag Assistant (by Google)
  2. Enter your website’s URL (e.g. https://yourwebsite.com)
  3. Click Connect
  • Your website will open in a new tab
  • The Tag Assistant debug panel will appear at the bottom of the screen

Step 3: Interact With Your Website

Now simulate the actions you want to track:

  • Load different pages (to test Page View triggers)
  • Click buttons or links (to test Click triggers)
  • Submit forms (to test Form Submission triggers)
  • Play videos, scroll, wait for timers, etc.

Step 4: Analyze the Debug Panel

Return to the Tag Assistant tab to see results.

Key Sections:

SectionWhat It Shows
SummaryTimeline of user interactions (Page View, Clicks, etc.)
TagsWhat tags fired (or did not fire) on each event
VariablesReal-time values of variables during each event
Data LayerData pushed to the dataLayer
Errors (if any)Helps you identify broken tags or wrong triggers

Tags marked “Fired” = success

Tags marked “Not Fired” = check trigger conditions or variables

Step 5: Debug Common Issues

  • Tag didn’t fire?

→ Double-check trigger conditions, especially URLs, click targets, etc.

  • Variable is undefined or empty?

→ Check if the variable is enabled or configured correctly

  • Page not connecting?

→ Make sure GTM is installed properly on your site

→ Try turning off browser extensions (like ad blockers)

Step 6: End Preview Mode

  1. Go back to Tag Assistant tab
  2. Click the “X” (top right) to Exit Preview mode
  3. GTM will return to normal editing mode

Note:

  • Always test on a staging site first (if available)
  • Use multiple devices/browsers for more thorough QA
  • Click each event in the Tag Assistant timeline to review tag behavior step-by-step
  • Keep the Preview Mode open in a separate tab for a smoother workflow

How can we help?