Prompt
Why is my cookie banner still letting Google Analytics fire before consent?
Latest observation
Oct 29, 2026
OpenAI APIWeb search: off
There are a few common reasons this happens:
-
GA is loaded too early
- The Google Analytics script or Google Tag Manager container may be hardcoded in the page header and loads before your consent logic runs.
- Even if the banner appears first visually, the script may already have executed.
-
Consent mode is not set to “denied” by default
- If you’re using Google Consent Mode, you need to set default consent states to denied before loading GA/GTM.
- If not, Google tags may fire using the default state.
-
Your banner only blocks the UI, not the tags
- Some cookie banners only stop cookie storage after consent, but don’t actually prevent analytics requests from firing.
- You need actual tag blocking or consent-aware tag management, not just a popup.
-
GTM trigger misconfiguration
- In Google Tag Manager, the Analytics tag may be triggered by “All Pages” instead of a consent-based trigger.
- Or the consent checks on the tag aren’t enabled.
-
Old cookies or cached scripts
- Existing GA cookies from prior visits can make it seem like tracking is still happening.
- Browser cache or an extension can also complicate testing.
-
Incorrect integration with the CMP
- Your consent management platform may not be communicating consent updates to Google correctly.
- For example, the required consent update event may not be pushed, or it may arrive too late.
What to check
- View page source / Network tab and confirm whether GA/GTM loads before consent.
- Ensure
consent default deniedis set before any Google tag loads. - In GTM, verify tags require the appropriate consent types.
- Test in a fresh incognito window with cache cleared.
- Confirm the consent banner actually updates Google Consent Mode when accepted/rejected.
If you want, I can help you debug it step by step if you share:
- whether you use GA4 directly or Google Tag Manager
- your cookie banner/CMP name
- a snippet of the relevant scripts or GTM setup