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
- Go to https://tagmanager.google.com
- Select your container
- In the top-right corner, click the Preview button
Step 2: Connect Your Website
- A new window/tab opens: Tag Assistant (by Google)
- Enter your website’s URL (e.g. https://yourwebsite.com)
- 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:
| Section | What It Shows |
| Summary | Timeline of user interactions (Page View, Clicks, etc.) |
| Tags | What tags fired (or did not fire) on each event |
| Variables | Real-time values of variables during each event |
| Data Layer | Data 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
- Go back to Tag Assistant tab
- Click the “X” (top right) to Exit Preview mode
- 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