Webclat / GTM Practice

Why won't GTM's preview/debug mode connect, or why does it show no tags firing?

Quick answer

Preview mode connects via a URL parameter and a same-origin handshake between the Tag Assistant tab and your site - it fails to connect when the debug parameter gets stripped by a redirect or SPA router, when a CSP or ad blocker blocks the connection script, or when you are previewing a container version that is not the one actually live on the URL you opened.

Why this happens

When you click Preview in GTM, it opens a new tab to your site with special query parameters appended and expects your site's GTM snippet to detect them and open a connection back to the Tag Assistant tab. Several common patterns break this handshake: a server-side redirect (http to https, a trailing-slash normalization) drops the query parameters before the page with the GTM snippet loads; an SPA router's replaceState on initial load strips query params as part of "cleaning" the URL; or the site has a security tool blocking cross-tab postMessage communication.

Fix it

  1. Confirm the URL that actually loaded in the Preview tab still has the debug parameters in its address bar after any redirect - if they are gone, your redirect chain or router stripped them, and Preview cannot connect.
  2. If an SPA router strips query params on mount, explicitly allowlist gtm_debug, gtm_auth, and gtm_preview so they survive the router's initial URL normalization.
  3. Rule out an ad blocker or privacy extension by trying an incognito window with extensions disabled - Tag Assistant's connection script is sometimes caught by generic tracker-blocking rules even though it is not itself a tracking script.
  4. Confirm you are previewing the correct container version - if your site loads GTM from a hardcoded published version or a cached asset (CDN, service worker), Preview can connect to a version that does not match what you are editing, and draft changes never appear to fire.
  5. Check the browser console for CSP violations blocking googletagmanager.com connections - if the base container cannot load under your CSP, Preview has nothing to connect to regardless of the URL parameters being intact.

How to verify it worked

A successfully connected Preview session shows your site's URL in the Tag Assistant panel with a green Connected indicator, and the Summary tab lists tags in real time as the page loads. If it instead shows a spinner indefinitely or a "not connected" message, work through the fix steps in order rather than repeatedly refreshing - refreshing does not fix a stripped parameter or a blocked script.

Still stuck after working through this?

Send us what you are seeing in Preview and the Network tab. We trace GTM containers for a living and can usually tell you what is actually happening in one look.

Ask a GTM Engineer