Google Tag Manager

How to Use GTM Preview Mode to Test Your Tags

Test tags before publishing with GTM Preview mode and Tag Assistant: connect to your site, read the event timeline, and debug tags that won't fire.

8 min read
Quick answer

Preview mode lets you test container changes on your real site before anyone else sees them. Click Preview in the top right of your GTM workspace, enter your site's URL, and click Connect; your site opens with a Tag Assistant badge while the Tag Assistant tab shows every event as it happens, which tags fired, which didn't, and why. Only your browser sees the draft container, so you can test freely. Nothing goes live until you click Submit.

Preview mode is the difference between publishing tags and publishing guesses. It runs your draft container on your real site, visible only to you, and narrates exactly what fires, what doesn’t, and why, before any of it touches your visitors or your data.

If GTM is new to you, the beginner’s guide covers the model this sits on; this guide is about the testing workflow you’ll use before every single publish.

Start a preview session

1

Click Preview in your workspace

In your GTM workspace at tagmanager.google.com, click Preview in the top right. A new tab opens with Tag Assistant.

GTM workspace Preview

You should see: Tag Assistant asking for your website’s URL.

2

Connect to your site

Enter the URL of the page you want to start on (your homepage is fine) and click Connect. Your site opens in a new window, with a small Tag Assistant badge indicating the debug session is live.

Tag Assistant showing the Connected confirmation after entering the site URL
GTM › Preview › Tag Assistant › Connected

You should see: back in the Tag Assistant tab, a “Connected” confirmation and a summary view beginning to fill with events.

If it won’t connect: disable ad blockers in the testing browser, allow the popup, make sure GTM is actually installed on the page, and if your site sits behind a password (unlaunched stores, staging), get past the password in the opened window first.

3

Browse and interact like a visitor

In the connected site window, do the things you want to test: navigate between pages, click the button you’re tracking, submit the test form. Every action lands in Tag Assistant’s left-hand timeline as an event.

Read what Tag Assistant is telling you

The interface has three areas that matter:

The event timeline (left). Every page load produces its standard sequence (Consent Initialization, Initialization, Container Loaded, DOM Ready, Window Loaded), and your interactions add events like Link Click or Form Submit, plus any custom events your site pushes. Select any event to inspect that exact moment.

Tags Fired / Not Fired (center). For the selected event, which tags ran and which didn’t.

Tag Assistant summary showing the Google tag under Tags Fired for a page load event
Tag Assistant › Summary › Tags Fired

The detail tabs. Click a tag to see its settings and, crucially, its firing triggers with a check or X per condition against the real values. Click an event and open the Variables tab to see what every variable held at that instant, or the Data Layer tab to see exactly what the page pushed.

The Variables tab for a click event showing Click Text, Click URL and Click Classes with their live values
Tag Assistant › select a click event › Variables tab

The debugging loop

Almost every “tag won’t fire” session resolves the same way:

  1. Select the event that should have triggered the tag. If the event itself is missing (no Link Click when you clicked), the trigger type isn’t listening for that interaction; a common example is a click trigger without the built-in Click variables enabled, or a JavaScript-heavy form that never emits a browser submit event.
  2. Click the Not Fired tag and read its conditions. One will show an X. Compare the condition against the Variables tab’s live value: capitalization, whitespace, a child element’s text instead of the button’s, a URL with a trailing slash.
  3. Fix the trigger or variable in GTM, then restart Preview. A running session does not pick up workspace edits on its own: go back to GTM, click Preview again so Tag Assistant syncs the updated draft, then refresh the site window and test again.
  4. When everything fires clean, publish. Preview tests the draft; visitors get nothing until you click Submit and publish the version. Name the version while you’re there; six months from now, “added GA4 pricing click event” beats “Version 14.”
Testing GA4 tags? Open DebugView too

A preview session automatically flags your GA4 hits as debug traffic, so they stream into GA4 > Admin > Data display > DebugView with full parameters. Tag Assistant proves the tag fired; DebugView proves GA4 received what you meant to send, with the event name and parameters spelled out. The GA4 troubleshooting guide covers DebugView in more depth.

Habits that keep containers trustworthy

  • Preview before every publish, no exceptions. The five minutes is cheaper than a week of silently broken data. Publishing untested changes is how containers rot.
  • Test the negative case too. A trigger that fires everywhere is as broken as one that never fires; click something that shouldn’t trigger the tag and confirm silence.
  • Leave the session, then verify live. After publishing, exit preview and do one real-world spot check (page source, or a quick DebugView pass) so you know the published version behaves like the draft did.

From here, the natural next steps are the recipes that lean on this workflow: tracking button clicks end to end, and understanding the trigger types you’ll be debugging.

Frequently asked questions

What does GTM Preview mode actually do?
It loads your workspace's draft container, unpublished changes included, in your browser only, and opens Tag Assistant to narrate everything: each page load and interaction as an event, which tags fired on each event, which didn't, and what every variable held at that moment. Visitors keep getting the published container, so testing never risks live data.
Is Preview mode visible to my site's visitors?
No. The debug session applies only to the browser that connected through Tag Assistant. Everyone else keeps receiving the published container version. That's the point: you can test a half-finished setup on the production site safely.
Why won't Tag Assistant connect to my site?
The usual culprits: an ad blocker or privacy extension in the testing browser (disable it or use a clean profile), a popup blocker stopping the debug window, aggressive page caching serving old HTML, the GTM snippet not actually being on the page yet, or a password page in front of the site. Fix the blocker, hard-refresh, and reconnect.
Do I still need to publish after testing in Preview mode?
Yes. Preview mode tests your draft; it changes nothing for visitors. When the tags behave, go back to GTM and click Submit, give the version a name, and publish. Forgetting to publish is the classic ending to 'but it worked in Preview.'
Does GTM Preview mode work with GA4?
Yes, and better than that: connecting Preview mode automatically puts your GA4 hits into debug mode, so your test events stream into GA4's DebugView (Admin > Data display > DebugView) with full parameters. You debug the GTM side in Tag Assistant and the GA4 side in DebugView, and together they cover the whole path.
Why does my tag say Not Fired?
Click the tag in Tag Assistant and it shows each of the trigger's conditions with a check or an X against the actual values. Usually one condition didn't match reality: the Click Text was different than assumed, a built-in variable was never enabled so it resolved to undefined, or the wrong trigger type was listening. Fix it in GTM, click Preview again to sync the updated draft, and test again.

Keep learning