Prompt
Cookiebot not blocking scripts
Latest observation
If Cookiebot isn’t blocking scripts, the usual cause is that the scripts are not being loaded in a way Cookiebot can control.
Here’s a quick checklist:
1) Make sure scripts are classified correctly
Cookiebot blocks scripts based on their type. They should look like this:
<script type="text/plain" data-cookieconsent="statistics" src="..."></script>
Common values:
marketingstatisticspreferencesunclassified
If your scripts are still type="text/javascript" or plain <script src="...">, Cookiebot won’t block them.
2) Cookiebot must load before the scripts
The Cookiebot script should be included as early as possible in <head>:
<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="YOUR-ID" data-blockingmode="auto" type="text/javascript"></script>
If the third-party scripts load before Cookiebot initializes, they may run before blocking happens.
3) Check for data-cookieconsent on inline scripts too
Inline scripts need to be converted as well:
<script type="text/plain" data-cookieconsent="marketing">
console.log("tracking");
</script>
4) If using data-blockingmode="auto", ensure it’s actually enabled
data-blockingmode="auto" is required for automatic blocking. Without it, you may need to manually tag scripts.
5) Scripts inserted dynamically may bypass Cookiebot
If scripts are added via JavaScript after page load, Cookiebot may not automatically stop them unless they’re handled through Cookiebot’s API or inserted conditionally after consent.
6) Check CSP, caching, or tag managers
- A tag manager (like Google Tag Manager) may fire scripts before consent.
- Browser cache can make it look like scripts are still running.
- Content Security Policy or optimization plugins may interfere with Cookiebot’s scan/block behavior.
7) Verify in the browser
Open DevTools:
- Check whether blocked scripts are being replaced or postponed.
- See if the consent banner is loaded before the other scripts.
- Inspect network requests to confirm whether the scripts are actually requested.
8) If you’re using WordPress or a site builder
Some themes/plugins:
- move scripts into the footer
- combine/minify scripts
- defer or async them
- inject scripts dynamically
These can prevent Cookiebot from recognizing them.
If you want, I can help you debug it if you paste:
- your Cookiebot
<script>tag, and - one example of a script that should be blocked.