To block scripts until consent, ClearCrumb rewrites every page on your server so that tracking scripts, iframes and stylesheets of your listed services cannot run until the visitor agrees to their category. You do not need to edit code or tag managers: pick your services and the blocking is automatic. This is what makes a banner more than a notice.
Why block scripts until consent?
A banner that only asks the question is not enough. Under the GDPR and the ePrivacy rules, optional cookies and similar tracking may only be set after the visitor says yes. If Google Analytics or the Meta Pixel loads with the page, it has already set cookies and sent data before anyone clicked a button.
So the real job of a consent plugin is to block scripts until consent is given, and to release them only for the categories the visitor accepts. ClearCrumb does this for scripts, iframes and tracking stylesheets.
Every service sits in one of four categories: Necessary, Preferences, Statistics and Marketing. Necessary services always run. The other three wait for a yes, and the visitor can accept one category while refusing another. Because ClearCrumb can block scripts until consent per category rather than all or nothing, a visitor who allows statistics but not marketing gets your analytics without your ad pixels.

How does ClearCrumb block scripts until consent?
Blocking happens in four steps, most of them on your server before the page reaches the browser:
- When WordPress builds a page, ClearCrumb looks at every
<script>,<iframe>and stylesheet link. - If it matches a service you have listed, the tag is changed so the browser does not run it: scripts get
type="text/plain"and adata-cc-category, iframes keep their address indata-cc-src, and stylesheet links keep theirs indata-cc-href. - A tiny guard script in the page head also catches scripts that other scripts add later.
- When the visitor agrees to a category, its scripts are released in their original order. If they withdraw a yes later, the page reloads so the code stops running.
A blocked script looks like this in the page source:
<script type="text/plain" data-cc-category="statistics" data-cc-service="google-analytics" src="…"></script>
Browsers ignore scripts whose type is not a JavaScript type; MDN explains this in its script element reference. Nothing is downloaded or run until ClearCrumb swaps the tag back.
Every page is rewritten the same way for every visitor, so full-page caching keeps working. You can block scripts until consent and still serve cached pages; see Cookie banner cache plugin.
Which services does ClearCrumb recognise?
ClearCrumb ships with 155 services, from Google Analytics and Tag Manager to Hotjar, the Meta Pixel, YouTube and Calendly. Each has a category, its cookies and the patterns used to recognise it. The library lives inside the plugin; nothing is downloaded.
Go to ClearCrumb → Services & cookies to add or remove services and to switch Wait for consent off for one service. Each service shows its state, such as Blocked or Loads without consent, so you can see at a glance what will block scripts until consent and what will not.
The quickest way to fill the list is the scanner, which finds the services your pages use. See WordPress cookie scanner. A service that is not in the library yet cannot be added by hand; custom services come in a later version.
Google, Microsoft, Meta and TikTok tags can also receive consent signals instead of only being blocked. That is covered in Google Consent Mode v2.
What do visitors see instead of blocked videos and maps?
A blocked iframe would leave an empty gap, so ClearCrumb shows a card in its place. The card names the host (for example “Hosted on YouTube. Loading it shares data with Google.”) and has two buttons:
- Load video, Load map or Load content: loads this one embed only.
- Always allow (for example Always allow marketing cookies): gives consent for the whole category, so every embed of that kind loads.
YouTube and Vimeo cards show the video thumbnail. Your server downloads it once and stores it in your uploads folder, so the visitor’s browser never contacts Google or Vimeo before consent.

What is never blocked or rewritten?
Necessary services
Services in the Necessary category, such as security or payment scripts, are never blocked. You cannot move a service into Necessary by hand; the category comes from the library. That way a plugin cannot quietly skip consent by being labelled necessary. If you are unsure whether a service is truly needed for the site to work, leave it in the category the library gives it.
Pages that are never rewritten
ClearCrumb only rewrites normal front-end pages. It leaves these alone:
- wp-admin, REST and AJAX requests, cron and feeds.
- The Customizer.
- Page-builder previews (Elementor, Beaver Builder, Divi, Bricks, Oxygen and Breakdance).
Developers can skip more pages with the clearcrumb_block_page filter (see Hooks & WP-CLI).
How do I check that blocking works?
Do not rely on the settings screen alone. Test it the way a visitor would:
- Run the Leak Test. It loads up to 15 of your pages as a brand-new EU visitor and lists any listed service that loaded before consent, with a Block button to fix it.
- Open your site in a private window, open the browser’s developer tools and look at the Network tab before you click anything. Tracking requests should not appear.
- Click Accept and check that your analytics start working.
If something still loads early, it is usually a service that is not on your list. Scan again, add the service, and test once more. That routine keeps blocking reliable, not just on the day you set it up.
ClearCrumb helps you meet consent rules; it is not legal advice.
Block scripts until consent: questions
Do I need Google Tag Manager to block scripts until consent?
No. ClearCrumb blocks tags on the server, whether they come from your theme, a plugin or a pasted snippet. Google Tag Manager is itself in the library as a statistics service, so it waits for consent too unless you switch that off.
Will blocking break my site?
Necessary services are never blocked, and admin, AJAX and REST requests are never rewritten. Blocked scripts run in their original order once consent is given.
Does it work with page caching?
Yes. Every visitor gets the same rewritten page, and the choice is applied in the browser, so cached pages keep working.
What happens when a visitor withdraws consent?
The page reloads, so the code that was allowed before stops running. Scripts of that category stay blocked until the visitor says yes again.