Prompt
How do I troubleshoot a cookie banner that shows but doesn't block tags?
Latest observation
If a cookie banner appears but doesn’t actually prevent tags from firing, the issue is usually that the banner is only visual and not properly connected to your tag management / consent system.
Here’s a practical troubleshooting checklist:
1) Confirm what “blocking” is supposed to do
A banner alone does not block tags. It must be integrated with one of these:
- Google Tag Manager + Consent Mode
- A CMP (cookie consent platform) integrated with GTM / your tags
- Manual tag gating using consent variables, triggers, or scripts
If your banner is just HTML/CSS/JS on the page, tags will still fire unless you explicitly stop them.
2) Check whether tags fire before consent is granted
Open browser DevTools:
- Network tab: reload the page and see if analytics/ads requests happen immediately
- Tag Assistant / GTM Preview: inspect which tags fire on page load
- Console: check for consent-related errors or missing variables
If tags fire before the user accepts, your consent setup isn’t applying early enough.
3) Verify consent state is being set correctly
If you use Google Consent Mode or GTM:
- Make sure consent defaults are set to denied before any tags load
- Make sure the user’s choice updates consent state after interaction
- Ensure the consent update uses the correct categories:
analytics_storagead_storagead_user_dataad_personalization
Common problem: the banner records acceptance, but the consent signal never reaches GTM/Google tags.
4) Make sure the consent script loads first
Consent defaults must load before any tags that depend on them.
Typical failure:
- GTM snippet loads first
- analytics tag fires
- banner script loads later
- too late to block anything
Fix:
- Place the consent initialization script at the top of the
<head> - Load GTM only after consent defaults are set, or use Consent Mode properly
5) Check tag trigger conditions in GTM
In GTM, tags may still fire if they’re not configured to respect consent.
Review:
- Tag settings: consent requirements
- Trigger conditions
- Built-in consent checks
- Any custom HTML tags that bypass consent
Important: Custom HTML tags often ignore consent unless you explicitly prevent them from running.
6) Inspect your CMP/GTM integration
If using a CMP such as Cookiebot, OneTrust, Didomi, etc.:
- Verify the CMP is connected to GTM
- Confirm it sends consent updates to the data layer or consent API
- Ensure tag categories map correctly
- Check whether the CMP blocks scripts automatically or only via manual configuration
Sometimes the banner is working, but the CMP is not configured to actually suppress scripts.
7) Look for tags outside GTM
Some scripts may be hardcoded in the site, not managed by GTM:
- Google Analytics script in theme/header
- Meta Pixel hardcoded
- Third-party embeds
- Heatmaps/chat widgets
These will fire regardless of your banner unless you gate them behind consent.
8) Test in a clean browser state
Use:
- Incognito/private window
- Clear cookies and local storage
- Disable extensions that may interfere
Then test:
- Load page
- Verify no consented tags fire
- Accept consent
- Verify tags begin firing
9) Check for race conditions
Sometimes the user accepts too late, but the tags already fired on page load.
To avoid this:
- Delay firing until consent is known
- Use default denied state
- Re-check consent before loading scripts
10) Debug the data layer
If you use GTM, inspect dataLayer:
- Is the consent event pushed?
- Is it pushed before container load?
- Is the category value correct?
Example signals to look for:
consent_defaultconsent_update- custom events from the CMP
Common root causes
- Banner is only cosmetic
- Consent defaults not set to denied
- Script loads too late
- Tags hardcoded outside GTM
- GTM tags not configured with consent requirements
- CMP integration incomplete
- Wrong category mapping
- Custom HTML tags bypassing consent
Quick fix strategy
If you want the shortest path to a working setup:
- Set consent default to denied on page load
- Ensure GTM/analytics loads after consent default
- Connect banner actions to a consent update event
- Block all non-essential tags until consent is granted
- Retest in incognito with DevTools
If you want, I can also give you:
- a GTM-specific debugging checklist
- a Google Consent Mode implementation example
- or help troubleshoot a specific banner/CMP you’re using.