Black Friday: the Evidence Report for €29 instead of €99 with code AUDIT29. Ends 1 December.

    Run a free audit

    Cookie Banner Not Blocking Trackers? How to Find and Fix the Leak

    Cookie banner not blocking trackers? Confirm the leak in a clean browser session, work through six common causes, fix them, and re-test the Reject and no-interaction paths.

    Ott Ristikivi16 min read
    A row of small glowing particles streaming toward a closed gate, with a few slipping through a hairline gap beside the gate frame.
    SecureSpells

    Why Your Banner Isn't Blocking: The Short Answer

    A cookie banner only records a visitor's choice; tags must be wired to wait for it. Trackers can still fire when tags sit outside the consent tool's control, load before it, or are classified as necessary. Confirm the leak in a clean browser session with no interaction, then again after Reject.

    If you installed a consent management platform (CMP), saw the banner appear and still find analytics or ad requests in the browser, the banner is probably working as designed. It shows a choice and stores the answer. Stopping a tag from running is a separate job, and it only happens if each tag is connected to that answer.

    Pre-consent leak

    A cookie, storage write or third-party request for a non-essential purpose (analytics, advertising, social) that happens before the visitor has chosen, or after the visitor chose Reject.

    Consent enforcement

    The technical wiring that stops non-essential tags from running until the matching consent category is granted. A CMP collects the choice; enforcement is whether the tags obey it.

    Scope: this article covers EU/EEA GDPR and the ePrivacy Directive Article 5(3). UK rules (PECR) are not covered here. Educational content, not legal advice.

    This is a troubleshooting guide organised by symptom: confirm the leak, find the cause, fix it, re-verify. For the mechanisms behind consent bypass, see how trackers bypass cookie consent. For the full DevTools detection method, see how to detect cookies loading before consent. This page does not repeat either.


    Confirm the Leak First (a 2-Minute Check)

    Before changing anything, reproduce the problem in a session that carries no history. A returning browser may already hold a stored consent choice, which hides exactly what you are looking for.

    1. Open a private window (or a fresh browser profile) with no extensions that block trackers.
    2. Open DevTools, go to the Network tab, tick Preserve log and Disable cache.
    3. Load your homepage and do not touch the banner. Wait about 10 seconds.
    4. Filter requests by third-party domains. Note any analytics, advertising or social domains (for example Google Analytics, Meta, TikTok or ad networks).
    5. Open the Application tab and look at Cookies and Local Storage. Note anything set by those vendors.
    6. Clear the site data, reload, click Reject all, and repeat steps 4 and 5.

    Three things to keep in mind. First, not every third-party request is a problem: a font host or a payment script that the page needs to work is a different case from an ad pixel. Second, ePrivacy Article 5(3) covers storing or reading information on the visitor's device, not only cookies, so a tracker that writes to local storage or reads a device identifier counts too (EDPB Guidelines 2/2023 on the technical scope of Art. 5(3)).

    Third, a correctly configured Google setup can still show Google requests before consent. In Consent Mode's advanced implementation, Google tags load before the consent dialog and, in Google's words, "instead of storing cookies, tags send pings to Google" when consent is denied (Google Analytics Help). The basic implementation holds Google tags back until consent is granted, so you would see no Google request at all. In the Network tab, look at the gcs parameter on the request, which carries the consent state Google tags are acting on (Google consent mode overview). For example, gcs=G100 means advertising and analytics storage are both denied. A denied-state ping with no cookie or storage write is how advanced mode is designed to behave, and whether you accept that is a question for your DPO. A Google request that carries a granted state before the visitor chose, or any cookie or storage write, is a leak.

    If non-Google analytics, advertising or social requests appear in step 4, if Google requests carry a granted state, or if anything is set or sent after Reject in step 6, the leak is confirmed. The remaining sections help you find where it comes from.

    The audit starts from the entry page you enter and also follows up to 25 same-origin links from it. It is not a full-site crawl. If your leak is on a checkout, landing page or product template, run it on that URL too.


    Six Common Causes

    Each cause below starts with the symptom you would see, then how to confirm it, then the fix. The table is the quick map.

    #CauseTypical symptomFastest confirmation
    1Tag hard-coded outside the tag managerPixel fires on every load, regardless of bannerSearch page source for the vendor's script URL
    2CMP script loads after the tagsRequests appear before the CMP request in the Network waterfallCompare request order in the waterfall
    3Auto-blocking off, or cookie classified "necessary"Banner category toggles do nothing for one vendorCheck the vendor's category in the CMP dashboard
    4Consent triggers or defaults missing or lateTags fire on page view before consent state existsPreview the tag manager container and read the consent state at first load
    5Theme, plugin or storefront-app pixelPixel appears even though the tag manager is cleanDisable apps and plugins one by one on a staging copy
    6Cached page or old tag versionFix is published but the leak persistsReload with cache disabled; compare container version

    1. Tags Hard-Coded Outside the Tag Manager

    Symptom: a vendor request fires on every visit, even though the tag manager has the tag behind a consent trigger.

    Confirm: view the page source and search for the vendor's script domain or ID. A tag pasted straight into the theme or template runs on its own schedule. A CMP can only gate what it controls.

    Fix: remove the hard-coded copy and keep one source of truth (the tag manager), or mark the script so the CMP can hold it back until consent. The pattern many CMPs use is to change the script type and add a category attribute:

    • Original: <script src="https://example-vendor.com/tag.js">
    • Held until consent: <script type="text/plain" data-category="analytics" src="https://example-vendor.com/tag.js">

    The exact attribute names differ by CMP, so use the ones in your vendor's documentation.

    2. CMP Script Loads After the Tags It Should Block

    Symptom: in the Network waterfall, tracker requests start before the CMP's own script has loaded.

    Confirm: sort the waterfall by start time. If the CMP request comes after the first analytics or ad request, blocking cannot apply to what already ran. Scripts loaded with async run as soon as they are downloaded, so their order against other scripts is unpredictable, and defer postpones a script until the page has been parsed. Cookiebot's documentation says not to add either attribute to its own auto-blocking script for this reason.

    Fix: load the CMP as early as its documentation allows, before any tag it is meant to control, and make sure the tag manager container itself loads after the CMP or is gated.

    3. Auto-Blocking Off, or Cookies Classified as "Necessary"

    Symptom: the banner has category toggles, but switching analytics or marketing off changes nothing for one vendor.

    Confirm: in the CMP dashboard, check two things: whether automatic blocking is switched on for your setup, and which category the cookie or script is assigned to. A script that sets only cookies classified as "necessary", or left unclassified, is not held back by automatic blocking, whatever the visitor chooses. New cookies added by a site change can also sit unclassified until someone reviews them.

    Fix: re-categorise the cookie or script to the correct purpose, and enable automatic blocking if your plan and setup support it. If you block manually, check that every vendor you found in the leak check has a rule.

    4. Tag Manager Consent Triggers or Consent Mode Defaults Missing or Late

    Symptom: tags fire at the first page view, before any consent state exists.

    Confirm: use the tag manager's preview mode and read the consent state on the first event. For Google tags, the default consent state (ad_storage, analytics_storage, ad_user_data, ad_personalization) must be set to denied before any Google tag runs, then updated when the visitor chooses. A default that arrives after the tags, or a tag that has no consent check, behaves as if consent was granted.

    Fix: set the defaults first, in the order the tag manager documentation describes, and add consent checks to tags that do not honour Consent Mode by themselves. Third-party tags (many ad and social pixels) usually need an explicit consent requirement on the trigger. Consent Mode is a signalling mechanism: it tells Google tags how to behave, it does not stop other vendors' scripts from loading. More on this in the Google Consent Mode v2 guide.

    Google's guidance for the four v2 consent types is to call the default command on every page before any command that sends measurement data, and it warns that if the consent code runs out of order, the defaults will not work (Google consent guide, checked 2026-11-15). If no default is set, Google's behaviour is that the defaults work as if all consent options were granted (Google Analytics Help, checked 2026-11-15).

    5. Theme, Plugin or Storefront-App Pixels Injected Directly

    Symptom: the tag manager is clean, yet a pixel still fires. Common on shops that added a marketing app, a chat widget, a review plugin or a theme with built-in tracking options.

    Confirm: note the vendor domain from the Network tab, then find what adds it. Disable apps, plugins and theme tracking settings one at a time on a staging copy and repeat the clean-session check. The request that disappears points to the source.

    Fix: use the app's own consent integration if it has one, move the pixel into the tag manager behind a consent trigger, or remove the app if the feature is not worth the exposure. Document which team owns each app, because new installs are where this cause comes back.

    6. Cached Pages or Old Tag Versions Served by a CDN

    Symptom: you published a fix, but the leak is still there in a clean session, or it appears only on some pages or regions.

    Confirm: reload with Disable cache on, check the response headers for cache hits, and compare the tag manager container version loaded on the page with the version you published.

    Fix: purge the CDN or page cache after changing tags or CMP settings, and re-run the clean-session check on the live URL, not on the editor preview.


    CMP-Specific Notes

    These notes summarise what each platform's own documentation says about blocking, with the page and the date it was read. They are not claims about any product's quality, and vendors change settings over time, so confirm in the current documentation for your plan.

    OneTrust (auto-blocking documentation, checked 2026-11-15)

    • OneTrust offers auto-blocking, tag manager integrations and manual JavaScript type-rewriting. Check which one your implementation uses.
    • The auto-blocking script must be the first script in the <head>, added directly to the page and not through a tag manager, and it must load synchronously.
    • Auto-blocking works from scan results and cookie categories. Cookies that are uncategorised or Strictly Necessary are not blocked, and a newly found cookie is not blocked until it is categorised, has the right source URL and the script is republished.
    • Cookies set by inline document.cookie code are not supported by auto-blocking and need type-rewriting.
    • With an opt-out consent model, cookies are allowed until the visitor opts out. Check the model set for your regions.

    Cookiebot (auto-blocking, how auto-blocking works and manual blocking, checked 2026-11-15)

    • Automatic mode is set by data-blockingmode="auto" on the Cookiebot script. In manual mode you mark each script with type="text/plain" and a data-cookieconsent category.
    • Cookiebot says any element that loads before its script can set cookies without consent, so the script must be the first one on the page and must not carry async or defer.
    • Elements that set only necessary or unclassified cookies are not blocked before consent. Unclassified cookies are left alone because they may be necessary, so classify them.
    • The auto-blocker takes its instructions from scans. Before a domain's first scan it falls back on a list of known trackers.
    • When the scan report lists cookies not blocked before consent, Cookiebot's first step is to reproduce the problem with a manual check in a private browser window.

    Usercentrics (auto-blocking in detail, checked 2026-11-15)

    • Auto-blocking is available on some packages only, and it works from the services the scanner found and you added in the admin interface. A service missing from that list is not in the block list.
    • Usercentrics says auto-blocking may not work reliably for services loaded through Google Tag Manager, and recommends GTM consent configurations or tag triggers for those.

    Shopify (pixel privacy, checked 2026-11-15)

    • Shopify's pixel manager loads an app or custom pixel only when the visitor has given the permissions that pixel declares as required.
    • That gate applies to pixels run through the pixel manager. Our reading is that a script an app adds directly to the theme does not pass through it, so check what each installed app injects.

    Verify the Fix

    After a fix, repeat the same clean-session procedure from the start of this article, on the live site, for both paths:

    PathWhat to doWhat you should see
    No interactionPrivate window, load, wait, do not touch the bannerNo cookies or storage writes, no non-Google analytics, advertising or social requests; any Google request carries a denied state (gcs=G100)
    RejectClick Reject all, reloadSame as above
    AcceptClick Accept allThe tags you expect now run, so you know blocking is not simply broken

    A manual check shows one visit from one browser. A runtime audit repeats the same observation on demand: SecureSpells loads the page in a real browser, records the cookies and requests before and after consent, categorises the trackers and vendors, and gives a Risk Score from 1 to 5. It observes and reports; it does not block trackers or change your CMP. Run a free audit after each fix and keep the result as a dated record of what fired.

    For a closer look at an implementation built and tested by a developer, see test-driven privacy for a custom consent layer. If you want to understand who checks your CMP's own blocking claims, see CMP self-scans versus independent audits and the SecureSpells and Cookiebot comparison.


    Keep It Fixed

    Blocking that works today can break after the next deploy. New campaign pixels, an app install, a theme update, a CMP configuration change or a new tag version can all bring a leak back, and nobody notices because the banner still looks right.

    SecureSpells scheduled re-audits run daily, weekly or monthly (the options depend on your plan) and send an email alert when the Risk Score changes. They are scheduled audits of the entry page and up to 25 of its same-origin links, not live monitoring of visitors. See why recurring checks beat a one-off audit for the reasoning, and pricing for the plan options. For what a banner-first setup looked like in practice, see banner installed, tracking not stopped: what the runtime data shows.


    Frequently Asked Questions

    Why is my cookie banner not blocking trackers?

    Because the banner and the tags are separate. The banner stores the visitor's choice; each tag has to be set up to wait for it. Tags hard-coded in the page, loaded before the CMP, classified as necessary, or missing a consent trigger can all run regardless of the choice.

    How do I check whether my cookie banner is really blocking tracking pixels?

    Load your site in a private window, open the Network tab, leave the banner alone and look for analytics, advertising and social requests. Repeat after clicking Reject. A runtime audit does the same observation automatically and records the result.

    Does Consent Mode block Google tags from loading?

    Consent Mode passes the consent state to Google tags so they can adjust their behaviour. It is a signal, not a blocker for other vendors' scripts, and it only works if the default state is set before the tags run. See the Google Consent Mode v2 guide.


    Fact Basis

    • ePrivacy Directive 2002/58/EC, Article 5(3): storing or accessing information on a user's device generally requires consent, with exceptions for what is strictly necessary. Text on EUR-Lex.
    • EDPB Guidelines 2/2023 on the technical scope of Article 5(3), version 2.0 adopted 7 October 2024: the rule applies beyond cookies, including URL and pixel tracking, IoT reporting and unique identifiers. EDPB document.
    • EDPB Cookie Banner Taskforce report, adopted January 2023: the common positions of the supervisory authorities on banner practices such as a missing reject button on the first layer, pre-ticked boxes and misclassified "essential" cookies. The report states that these positions are a minimum threshold, not a clearance from any authority. EDPB document.
    • GDPR Article 7: conditions for consent. Article 7.
    • Google documentation, checked 2026-11-15: Consent Mode overview, consent guide and Google Analytics Help on consent mode.
    • Vendor documentation (OneTrust, Cookiebot, Usercentrics, Shopify): the pages linked in the CMP-specific notes, each read on 2026-11-15.
    • SecureSpells capabilities described here come from the audit engine and its check registry: a real-browser load, cookies and requests before and after the consent choice, tracker categorisation, a Risk Score from 1 to 5, an entry page plus up to 25 same-origin links, and scheduled re-audits (daily, weekly or monthly by plan) with an email alert when the score changes.

    Educational content, not legal advice. Whether a specific setup meets the law depends on your facts, so consult your DPO or legal counsel.