You click Preview in Google Tag Manager. A new tab opens. And then… nothing. No debug panel. No tags. Just your website staring back at you. GTM preview mode not working is one of the most frustrating debugging experiences because you can’t debug without the debugger.
Here’s every fix we know, from the obvious to the obscure.
Understanding How GTM Preview Mode Works
Before troubleshooting, understand the mechanism. When you click Preview:
- GTM stores a debug cookie in your browser
- You navigate to your site
- GTM on your site reads the cookie and activates debug mode
- The Tag Assistant panel loads in a connected window
Failure at any step breaks preview mode. Let’s fix each one.
Fix 1: Browser Cookie and Storage Issues
The most common cause of GTM preview mode not working is cookie/storage problems.
Check Third-Party Cookies
GTM preview requires third-party cookies. Many browsers now block these by default.
Chrome:
- Click the lock icon in the address bar
- Click “Cookies and site data”
- Ensure googletagmanager.com isn’t blocked
- Or: Settings → Privacy → Cookies → Allow all cookies (temporarily)
Firefox:
- Click the shield icon in address bar
- Turn off Enhanced Tracking Protection for this site
- Reload and reconnect preview
Safari: Safari aggressively blocks third-party cookies. For testing:
- Safari → Preferences → Privacy
- Uncheck “Prevent cross-site tracking” (temporarily)
- Reconnect preview mode
Clear GTM-Specific Cookies
Corrupted debug cookies cause silent failures:
- Open DevTools (F12) → Application tab
- Click Cookies in the sidebar
- Delete any cookies containing “gtm” or “debug”
- Also clear cookies for googletagmanager.com
- Close ALL browser tabs
- Restart browser
- Try preview again
Check Local Storage
GTM also uses localStorage:
// In console, clear GTM storage
Object.keys(localStorage)
.filter(key => key.includes('gtm'))
.forEach(key => localStorage.removeItem(key));
Fix 2: Browser Extension Conflicts
Ad blockers and privacy extensions frequently break GTM preview mode.
Common Culprits
- uBlock Origin: Blocks googletagmanager.com by default
- Privacy Badger: Blocks tracking scripts
- Ghostery: Interferes with debug connections
- AdBlock Plus: May block GTM requests
- Brave Shield: Blocks third-party cookies and scripts
The Quick Test
- Open an Incognito/Private window
- IMPORTANT: Disable all extensions in incognito mode
- Log into GTM
- Click Preview
- Navigate to your site
If preview works in incognito with extensions disabled, one of your extensions is the problem. Enable them one by one to find the culprit.
Whitelisting GTM
Instead of disabling extensions, whitelist these domains:
googletagmanager.comtagmanager.google.com- Your own website domain
Fix 3: Wrong Browser Tab or Window
Preview mode is tied to a specific browser session. Common mistakes:
Problem: Different Browser
You have GTM open in Chrome, but you’re testing in Firefox. Preview mode cookies don’t transfer between browsers.
Fix: Use the same browser for both GTM and your website.
Problem: Different Browser Profile
You’re logged into GTM in your work Chrome profile but testing in your personal profile.
Fix: Use the same Chrome profile for both.
Problem: Closed the Preview Window
You clicked Preview, it opened a new tab, and you closed that tab and opened your site manually.
Fix: Let GTM open the preview tab. Don’t close it and navigate manually.
Problem: Multiple GTM Tabs
Having multiple GTM tabs can confuse the preview session.
Fix: Close all GTM tabs except one, then restart preview.
Fix 4: URL and Domain Issues
Preview mode needs to load on a valid page where your GTM container exists.
HTTPS vs HTTP Mismatch
GTM preview generally requires HTTPS. If your test site is HTTP:
- Check if an HTTPS version exists and use that
- For local development, use a tool like mkcert to add local SSL
- Some preview features may work on HTTP but are unreliable
Wrong URL in Preview
When you start preview, GTM asks for a URL. Common mistakes:
- Entering a URL where GTM isn’t installed
- Typo in the domain
- Including URL parameters that redirect elsewhere
Fix: Enter your homepage URL first, then navigate to other pages after preview connects.
Localhost Issues
Testing on localhost requires extra steps:
http://localhost:3000 ← May not work
http://127.0.0.1:3000 ← Try this instead
Also ensure your localhost GTM snippet uses the same container ID you’re previewing.
Fix 5: GTM Container Not Loading
Preview mode can’t debug a container that isn’t loading.
Verify Container Loads
- Open DevTools → Network tab
- Filter by “gtm”
- Reload your page
- Look for:
googletagmanager.com/gtm.js?id=GTM-XXXXX
If this request doesn’t appear or returns an error, your container isn’t loading. Common causes:
- GTM snippet removed or commented out
- Wrong container ID in snippet
- JavaScript error before GTM loads
- Content Security Policy blocking GTM
Check Container ID Match
The container ID in your website’s code must match what you’re previewing:
<!-- Your site should have exactly this ID -->
<script>(function(w,d,s,l,i){...})(window,document,'script','dataLayer','GTM-XXXXXX');</script>
Verify GTM-XXXXXX matches the container you have open in GTM.
Snippet Placement
GTM requires specific placement:
<head>
<!-- GTM snippet should be here, immediately after <head> -->
<script>(function(w,d,s,l,i){...
</head>
<body>
<!-- GTM noscript should be here, immediately after <body> -->
<noscript>...
Wrong placement can cause timing issues with preview mode.
Fix 6: Tag Assistant Issues
The Tag Assistant panel itself can malfunction.
Tag Assistant Legacy vs New
Google has two Tag Assistant tools:
- Tag Assistant Legacy (Chrome extension) - Being deprecated
- Tag Assistant (built into GTM) - The preview panel
If you have the old Tag Assistant extension, it can conflict with the new preview:
- Remove or disable Tag Assistant Legacy extension
- Use only the built-in GTM preview
Panel Not Loading
If preview activates but the Tag Assistant panel is blank or stuck loading:
- Check if tagassistant.google.com is blocked
- Try in a different browser
- Clear browser cache completely
- Check for JavaScript console errors on the panel page
Connection Lost
The panel shows “Connection lost” or keeps reconnecting:
- Check your internet connection stability
- Disable VPN if using one
- Corporate firewalls may block WebSocket connections
- Try a different network (mobile hotspot as test)
Fix 7: Container Configuration Problems
Issues within GTM itself can break preview.
Too Many Tags
Containers with hundreds of tags can overwhelm preview mode:
- Try creating a test workspace with fewer tags
- Use folders to organize and disable groups temporarily
- Check for infinite loops or recursive triggers
Broken Variables
Custom JavaScript variables with errors can crash preview:
// This breaks preview silently
function() {
return undefined.property; // Runtime error
}
Temporarily disable custom JavaScript variables to test.
Corrupted Workspace
Rarely, a workspace can become corrupted:
- Create a new workspace
- Try preview in the new workspace
- If it works, abandon the old workspace or export/import your changes
Fix 8: Network and Firewall Issues
Corporate environments often have aggressive filtering.
Domains to Whitelist
For GTM preview to work, these must be accessible:
googletagmanager.comtagmanager.google.comtagassistant.google.comwww.googletagmanager.comssl.google-analytics.com
VPN Problems
VPNs can interfere with the WebSocket connection preview uses:
- Disconnect VPN temporarily
- Test preview
- If it works, your VPN is the issue
- Ask IT to whitelist the domains above
Corporate Proxy
If your company uses a proxy:
- Preview may not work through the proxy
- Ask IT about exceptions for Google domains
- Test from a non-corporate network to confirm
Fix 9: The Nuclear Options
When nothing else works:
Complete Browser Reset
- Export your bookmarks
- Sign out of all Google accounts in the browser
- Clear ALL browser data (history, cookies, cache, everything)
- Restart browser
- Sign back into Google
- Try preview
Different Browser Entirely
If Chrome consistently fails:
- Try Firefox
- Try Edge (Chromium-based)
- Try a Chromium-based alternative like Brave (with shields down)
Different Computer
If nothing works on your machine:
- Try on a colleague’s computer
- Try a completely fresh browser profile
- This helps identify machine-specific issues
Alternative Debugging When Preview Won’t Work
While you fix preview mode, you can still debug using other methods:
Console-Based Debugging
// Check if GTM loaded
console.log(typeof google_tag_manager !== 'undefined');
// View the data layer
console.log(dataLayer);
// Watch data layer pushes
(function() {
var original = dataLayer.push;
dataLayer.push = function() {
console.log('dataLayer.push:', arguments);
return original.apply(dataLayer, arguments);
};
})();
GA4 DebugView
For GA4 tags specifically:
- Add
?gtm_debug=1to your URL - Open GA4 → Admin → DebugView
- Your events should appear there
Network Tab Inspection
- DevTools → Network tab
- Filter by:
collect(for GA4),facebook.com(for Meta), etc. - Watch requests as you interact with the page
Quick Checklist
Before giving up, run through this quick checklist:
- Same browser and profile for GTM and testing
- Third-party cookies enabled
- Ad blockers disabled or GTM whitelisted
- GTM container actually loads on the page
- Container ID matches between code and GTM
- No VPN or proxy interference
- Tag Assistant extension removed/disabled
- Tried incognito with no extensions
- Tried a different browser
Still Can’t Get Preview Working?
Preview mode issues often indicate deeper problems with your GTM setup—container conflicts, installation issues, or network problems that also affect your production tracking.
If you’ve tried everything above and preview still won’t work, there’s likely something unusual about your setup that needs expert diagnosis.
Get a free GTM scan and we’ll identify what’s broken in your container and why preview mode isn’t cooperating.