Skip to content
🚀 Find us on Product Hunt

Debugging Your GTM Container

Quick answer: Open GTM, click Preview, connect it to your store in a new tab, then trigger the action you're testing (add to cart, checkout, etc). The Tag Assistant panel shows exactly which tags fired, which didn't, and what values each variable held at that moment - always check this before publishing a container.

Every guide on this site tells you to "check GTM Preview mode before publishing" - this page explains exactly how, since it catches the vast majority of tracking problems before they ever reach production.

Using Preview mode

  1. In GTM, click Preview in the top right.
  2. Enter your store's URL and click Connect - this opens your site in a new tab with Tag Assistant attached.
  3. Perform the action you're testing - view a product, add to cart, begin checkout, complete a purchase.
  4. Back in the Tag Assistant panel, click through each event in the left-hand timeline (Container Loaded, then each Custom Event as it fires).
  5. For each event, check the "Tags Fired" list matches what you expect, and the "Tags Not Fired" list only contains tags that genuinely shouldn't fire yet.

Reading variable and data layer values

Click "Variables" in the Tag Assistant panel for any event to see every GTM variable's live value at that moment - this is how you catch a mismatched key name or an empty value before it reaches a live ad account. Click "Data Layer" to see the raw dataLayer.push() object your site actually sent.

Common things this catches

Frequently asked questions

Do visitors see anything different while I'm in Preview mode?

No - Preview mode only affects the browser tab you connected. Other visitors continue seeing your currently published container, unaffected.

My tag shows as fired, but I don't see data in GA4/Meta - why?

A tag firing in GTM only confirms GTM sent the request - check the destination platform's own real-time/debug view (GA4 DebugView, Meta Pixel Helper, etc.) to confirm it was received and parsed correctly on their end.

Should I test in an incognito window?

It's good practice - it avoids ad blockers, extensions, or stale consent cookies from a previous session skewing what you see.

Other advanced topics

← All advanced guides

Share with