Your GTM Custom HTML tag shows a green checkmark in Preview mode — the tag fires. But no data appears in your analytics tool. This is one of the most frustrating GTM debugging scenarios. The tag runs, but something silently fails inside it. This checklist walks through every possible failure point in order of likelihood.
Verify the Tag Actually Executed Its Code
GTM Preview showing “Tag Fired” only means the JavaScript was injected — not that the code inside ran successfully. Add a console.log as the first line:
<script>
console.log('[GTM Debug] Custom HTML tag executing');
gtag('event', 'test_event', {event_category: 'debug'});
console.log('[GTM Debug] gtag call made');
</script>
Check for JavaScript Errors
- ReferenceError: gtag is not defined — GA4 config tag hasn’t loaded yet; use tag sequencing
- TypeError: Cannot read property of undefined — a dataLayer variable doesn’t exist on this page
- SyntaxError — malformed JS inside script tag; validate with an online linter
- Content Security Policy blocked — check Console for CSP violations
Tag Firing Order Problems
Use Tag Sequencing: Advanced Settings → Tag Sequencing → fire config tag before custom HTML tag. Or wrap code defensively:
function waitForGtag(cb, n) {
n = n || 10;
if (typeof gtag === 'function') { cb(); }
else if (n > 0) { setTimeout(function(){ waitForGtag(cb, n-1); }, 200); }
}
waitForGtag(function() {
gtag('event', 'your_event', {event_category: 'test'});
});

Network Request Check
Open DevTools → Network → filter “g/collect”. Fire the event and watch for requests to google-analytics.com/g/collect. If you see the request, GA4 received the hit. If not, the gtag call itself failed.
Variable Not Populating
var userId = '{{dlv - user_id}}';
if (!userId || userId === 'undefined' || userId === '') {
console.warn('[GTM] user_id not available, skipping');
return;
}
// proceed with tracking
Ad Blockers and Extensions
Test in incognito with no extensions. uBlock Origin, Privacy Badger, and similar extensions block GTM entirely or block analytics calls. If it works in incognito but not regular mode, an extension is blocking it — this affects real users too.
Debug Checklist
- ☐ Add console.log as first line — confirm execution
- ☐ Check Console for JS errors
- ☐ Verify tag firing order — config before custom HTML
- ☐ Check Network for outgoing collect requests
- ☐ Verify all GTM variables have values at fire time
- ☐ Test in incognito with no extensions
Related: GTM DataLayer Push Timing, GA4 DebugView Not Showing Events.
