Browser Console Errors
Failed to load resource: the server responded with a status of 404 (Not Found)
- Occurs if the GTM container script or dependent scripts (e.g., analytics.js) cannot be loaded.
Uncaught ReferenceError: gtag is not defined
- Triggered when the
gtag
function is called but the necessary libraries haven’t been loaded.
- Triggered when the
Uncaught SyntaxError: Unexpected token
- Indicates a syntax error in custom JavaScript added to GTM.
Refused to execute script from 'https://www.googletagmanager.com/...' because its MIME type ('text/html') is not executable
- Happens if the server or CSP misidentifies the GTM script.
Refused to load the script ... because it violates the following Content Security Policy directive
- A strict CSP policy is blocking GTM scripts.
Uncaught TypeError: Cannot read properties of undefined (reading 'X')
- Commonly occurs if a JavaScript variable or DOM element expected by GTM is missing or undefined.
A cookie associated with a cross-site resource at <domain> was set without the
SameSiteattribute
- Indicates an issue with cookie handling, especially in cross-domain tracking setups.
GTM Preview Mode Errors
No tags were fired.
- Indicates that no tags matched the firing conditions during a user action.
Tag blocked by a trigger.
- A trigger’s conditions actively prevent a tag from firing.
Tag is not firing due to consent settings.
- Seen when GDPR or CCPA consent is not obtained for certain tags.
Tag not fired: X (Script not allowed).
- Occurs if scripts are blocked by a site’s security policies or third-party extensions.
Error: Container does not match this site.
- Happens if the container ID used in GTM does not match the website’s container.
Error establishing connection to the tag assistant preview server.
- Indicates an issue connecting GTM Preview Mode to the Tag Assistant.
Google Analytics Errors via GTM
Measurement Protocol requests are not matching.
- Happens if the data sent through GTM does not match Google Analytics configurations.
GA4 Configuration tag is missing.
- Occurs if the necessary GA4 configuration tag hasn’t been set up.
Duplicate hit detected.
- Seen when the same event is tracked multiple times, often due to duplicate GTM triggers.
Invalid event parameter
- Indicates a mismatch between the event parameters sent and what GA expects.
Network Errors
net::ERR_BLOCKED_BY_CLIENT
- Indicates that a browser extension (e.g., ad blockers) is preventing GTM or analytics scripts from loading.
Failed to load https://www.googletagmanager.com/gtm.js: net::ERR_INTERNET_DISCONNECTED
- Suggests a connectivity issue preventing GTM scripts from loading.
Status Code: 403 Forbidden
- Indicates that the GTM container script is restricted, possibly due to incorrect permissions or regional limitations.
Consent and Privacy Errors
Consent mode configuration error.
- Indicates that GTM’s consent mode is misconfigured or not supported by certain tags.
GTM Error: No consent was provided for this tag.
- Seen when GDPR/CCPA consent is not granted for a specific action.
Other Common Errors
GTM script not found
- Occurs when the GTM container ID is missing or incorrectly embedded on the website.
Blocked a frame with origin ... from accessing a cross-origin frame.
- Indicates a cross-origin issue that can arise during debugging in Preview Mode.
GTM cannot execute due to insufficient permissions.
- Happens if the GTM container permissions are misconfigured, such as limited access for a collaborator.
Error loading container: timeout
- Occurs if GTM fails to load within the allowed time due to network or server latency.
Understanding these error messages can help pinpoint specific problems with your GTM setup and guide effective troubleshooting steps.