A cookie banner that only shows a message and saves an answer does nothing about the scripts already in your page. If Google Analytics or an ad pixel is in your HTML, it runs while the banner is still on screen. Cookie auto-blocking, also called prior blocking, closes that gap where the region requires consent first. This guide explains what it is, how it works, how recognised and custom patterns are held, and how to check it.
Last reviewed: 24 November 2026.
Which engine am I on?
Cookie Compliance runs two banner engines. Check the snippet address: if it contains /v2/, you are on the New engine; if it does not, you are on the Classic engine. The portal’s Configuration header Banner engine dropdown shows the same. Free-limit behaviour and Consent Mode loading differ by engine, and this guide says where. For the steps in the dashboard, see the cookie auto-blocking documentation.
What cookie auto-blocking is
Auto-blocking means your consent tool, where the region requires consent first, holds non-essential scripts and embeds before they run, then releases only the ones the visitor agrees to. “Auto” means the tool recognises common trackers by itself, so you do not tag every script by hand.
Without it, or another way of gating scripts, a banner is a notice. With it, the visitor’s choice controls the trackers the tool recognises.
Why a notice alone is not enough
Rules on storing or reading information on a visitor’s device turn on consent, with exceptions for technologies that are strictly necessary. Two regulators say so directly:
- EU: the European Data Protection Board says that under Article 5(3) of the ePrivacy Directive, storing or accessing information on a user’s device “is only allowed on the basis of consent or necessity for specific purposes” (EDPB Guidelines 2/2023, version 2.0, adopted 7 October 2024).
- UK: the Information Commissioner’s Office says “You must not pre-enable non-exempt storage and access technologies”, and that you need appropriate arrangements with third parties whose features are embedded in your site (ICO guidance on storage and access technologies, finalised 29 April 2026).
This is a description of a mechanism, not legal advice. Which rules apply to your visitors is a decision for you and your legal adviser.
How auto-blocking works
Using Cookie Compliance as the example, this is a first visit before any choice is saved, in a place where the region requires consent first:
- Recognise. The banner compares the page’s scripts and iframes with more than 280 built-in patterns from 181 providers, plus any patterns you add.
- Hold. Where the region requires consent first, a recognised non-essential script does not run. In the page, its type becomes
javascript/blockedand an external script’s address moves fromsrctodata-src. Recognised iframes are held too. - Ask. The visitor sees the banner and chooses.
- Release by purpose. Each provider sits in one of four purpose categories. Only providers in categories the visitor accepted are released.
- Remember. The choice is saved. On later pages it applies from the start: accepted categories run straight away and the rest stay held.
| Category | Examples from the built-in list | Held before a choice, where consent comes first? |
|---|---|---|
| 1 Basic Operations | The banner’s own script | Never |
| 2 Content Personalization | Google Tag Manager, YouTube embeds, Google Maps | Yes, see the note below |
| 3 Site Optimization | Google Analytics, Hotjar | Yes |
| 4 Ad Personalization | Meta pixel, Google Ads, Microsoft Advertising | Yes, see the note below |
Note on Google Tag Manager and Google’s own tags. On the Classic engine with Google Consent Mode on, Google’s tag, gtag and the GTM container load straight away with the default “denied”. Google Consent Mode alone does not let the Meta or Microsoft loaders through; they load early only when Meta or Microsoft Consent Mode is on (Professional). On the New engine there is no such exemption: where the region requires consent first, GTM and gtag are held until Content Personalization (category 2) is accepted, and Meta, UET and Clarity until Ad Personalization (category 4) is accepted.
“Held” means the script does not run. A browser may still download the file early, because it fetches scripts it finds ahead in the page. Judge a test by cookies and data requests, not by the file request alone.
Where blocking applies
Cookie Compliance holds recognised trackers before consent where the region requires consent first. On Professional with Geolocation on, the default rules treat GDPR and UK PECR places as consent-first and every other place as opt-out; on the New engine with Managed region rules, further places from our country research (for example Brazil and Quebec) are asked first too. You can change each place’s rule. On the Free plan every visitor gets the same banner.
Four setup steps for recognised and custom patterns
Auto-blocking holds what it recognises. These four steps cover the rest.
- Put the banner first. Its snippet must be the first script in
<head>, on every page, withoutasyncordefer. It can only hold scripts that have not run yet. On WordPress, the plugin handles placement. - Cover trackers the list does not know. Add a URL pattern to an existing provider in the dashboard’s Autoblocking page (any plan), add your own provider (Professional), or mark a script yourself with
data-hu-categoryset to 2, 3 or 4. After you publish, a manual install needs the updated snippet from Integrations pasted over the old one. On WordPress, use Pull Configuration so the plugin picks it up.data-hu-categoryneeds no publish. - Gate tags that a tag manager fires. In Google Tag Manager, add consent triggers to the tags. See cookie consent with Google Tag Manager.
- Stay within the Free visit cycle, or upgrade. Free covers 1,000 visits per 30-day cycle, and Professional has no visit limit. Past the limit: on the Classic engine, the banner stops holding new scripts and leaves any it had already held; on a WordPress site, the plugin switches holding off for the page. On the New engine, the engine switches off and releases the scripts it was holding.
Then test it. To switch these settings on in the dashboard, see the Autoblocking overview and the Autoblocking checklist. For tags and pixels added after the snippet, see the tags and pixels cookbook.
When a visitor changes their mind
A new choice is saved at once. If a visitor lowers their choice, scripts that already ran keep running until the next page load, when only the providers the new choice allows are released. The Reloading setting reloads the page right after a choice is saved.
Auto-blocking and Consent Mode are different jobs
Blocking stops a script from running. Consent Mode tells a vendor’s own tags what the visitor chose. Consent Mode signals do not replace blocking, and blocking does not send Consent Mode signals. Cookie Compliance can do both: switch on Google Consent Mode when you need the signals. See Google Consent Mode v2.
Where Cookie Compliance fits
Cookie Compliance, by Hu-manity.co, includes auto-blocking on the Free plan up to the visit limit, with URL patterns for existing providers. Professional adds your own providers, no visit limit, region rules (Geolocation defaults), and Meta and Microsoft consent modes. Google Consent Mode is on both plans. Compare them on pricing or see all features. Auto-blocking is one mechanism, next to a clear notice, real choices and consent records. It does not, on its own, make a site compliant.
FAQ
What is cookie auto-blocking?
Cookie auto-blocking is a consent tool holding non-essential scripts and embeds before they run, where the region requires consent first, then releasing only the ones the visitor accepts. The tool recognises common trackers itself, so you do not tag each script by hand.
Does auto-blocking stop the script file from downloading?
Not always. A browser may request a held script file early, but the file’s code does not run or start further requests. Check cookies and data requests when you test, not the file request alone.
Does auto-blocking make a website GDPR compliant?
No. Auto-blocking is one mechanism for keeping trackers from running before consent. A site also needs a clear notice, real choices and records, and which rules apply is a decision for the owner and their legal adviser.
Does auto-blocking work with Google Tag Manager?
Yes, with one step. Put the banner above the GTM container and add consent triggers to the tags GTM fires. How the container itself loads depends on the banner engine, as the Google Tag Manager guide explains. Gate every other tag inside GTM with consent triggers.
Is auto-blocking free?
Yes, on the Cookie Compliance Free plan, for up to 1,000 visits in each 30-day cycle. Stay within that cycle or upgrade to Professional, which has no visit limit.
What happens to a tracker the built-in list does not recognise?
Add its URL as a pattern or mark it with data-hu-category, and it is held like the recognised ones, where the region requires consent first. In the dashboard, add the URL on the Autoblocking page, or mark the script with data-hu-category 2, 3 or 4. After you publish, a manual install needs the updated snippet from Integrations pasted over the old one, and on WordPress you use Pull Configuration. data-hu-category needs no publish.
Start free with Cookie Compliance. Auto-blocking is included, and no payment is needed. More guides are on the guides page.