GA4 & GTM Troubleshooting Guide
Learn how to debug Google Tag Manager, fix GA4 data discrepancies, and solve GA4 not tracking issues.
Diagnosing Data Discrepancies
Troubleshooting GA4 and Google Tag Manager requires a systematic approach to isolating data drop-offs. Discrepancies often stem from asynchronous loading issues, aggressive browser tracking protections (ITP), or misconfigured consent states. The first diagnostic step is evaluating the network payload. Using Chrome DevTools, engineers must inspect the collect requests directed to google-analytics.com/g/collect, verifying that critical parameters like session ID, client ID, and engagement metrics are correctly populated in the payload.
Advanced Preview Mode Debugging
The native GTM Preview Mode is the primary diagnostic interface for runtime evaluation. It is crucial to monitor the chronological sequence of the dataLayer events and the subsequent tag firing status. Engineers must scrutinize the exact conditions that prevent a tag from firing—whether due to an improperly scoped trigger variable, a race condition where the tag fires before the variable resolves, or a blocking rule enforced by an ungranted Consent Mode v2 state.
Solving "Not Tracking" Errors
When tracking ceases entirely, the root cause usually lies in architectural misconfigurations. Common culprits include Content Security Policy (CSP) directives blocking the GTM script execution, malformed dataLayer pushes in Single Page Applications (SPAs) failing to trigger history changes, or server-side (sGTM) routing failures returning HTTP 500s. Resolving these issues demands rigorous testing across multiple browsers to validate that both client-side events and server-to-server transmissions are executing flawlessly.
Ready to fix your tracking?
Get a comprehensive audit of your Google Tag Manager setup.