Block scripts until consent
In auto mode BerryCookie holds trackers until the visitor accepts their category, including ones that other scripts add later:
- the trackers your scans found. Every domain that sets a *statistics* or *marketing* cookie on your site (or whose script stores one) is blocked with that category, as classified in Cookies. When you change a cookie's category, the blocking follows;
- well-known trackers (Meta, LinkedIn, TikTok, X, Pinterest, Snapchat, Bing, Taboola, Outbrain, Hotjar, Microsoft Clarity, Yandex, Mixpanel, Segment, Amplitude, HubSpot, FullStory), from the first page view, even before your first scan.
BerryCookie holds <script src> tags and iframes from those domains (a YouTube video, for example, only if the scan classified YouTube's cookies as marketing). A held iframe stays empty until its category is accepted.
Never blocked automatically, so your site keeps working: Google tags (Google Tag Manager, Analytics, Ads, which receive Google Consent Mode signals instead), payments (Stripe, PayPal, Braintree), bot protection (reCAPTCHA, hCaptcha, Cloudflare Turnstile), library and font CDNs (cdnjs, jsDelivr, unpkg, jQuery, Google Hosted Libraries, Google Fonts), BerryCookie itself and your own domains and subdomains. Necessary, preferences and unclassified cookies never make a domain blocked.
Choose what is blocked. Cookies → Automatic blocking lists what BerryCookie blocks on your site: each domain, its category and why (found by the scan, declared by you, or a well-known tracker). Turn a domain's switch off to stop blocking it, or turn automatic blocking off altogether (then only the tags you mark wait). Changes reach your site within a minute.
Exempt one tag. Add data-bc-category="ignore" (or data-cookieconsent="ignore") and that tag is never blocked automatically:
<script src="https://widgets.example.com/chat.js" data-bc-category="ignore"></script>Inline scripts are not blocked automatically (they have no address to recognise). Mark them, and your own scripts and embeds, yourself: change type to text/plain and add the category. They run as soon as the visitor accepts it:
<!-- Runs only after the visitor accepts "statistics" -->
<script type="text/plain" data-bc-category="statistics"
src="https://example.com/analytics.js"></script>
<!-- Inline code works the same way -->
<script type="text/plain" data-bc-category="marketing">
loadChatWidget();
</script>
<!-- Loads only after "marketing" is accepted -->
<iframe data-bc-src="https://www.youtube.com/embed/VIDEO_ID"
data-bc-category="marketing"></iframe>Categories: necessary (always allowed), preferences, statistics, marketing, plus any custom category you add to the banner. data-cookieconsent is accepted too, so pages prepared for Cookiebot work unchanged.
Good to know. The list from your scans reaches the visitor's browser with the banner settings and is kept there (in local storage, BerryCookieBlock) for the next pages. On a visitor's very first page, a tag written in your HTML can start before the list arrives; well-known trackers are held from the first moment. A blocked <script src> written in the HTML may still be downloaded by the browser, though it does not run. Where even that matters, mark the tag as above: a marked tag is never fetched before consent.
If something stops working. The scanner records JavaScript errors on your home page before consent. When there are some, Cookies → Automatic blocking and the scan details show them with this hint: a blocked script may be needed by another one. Turn that domain off, or mark the script that depends on it with the same category.
Need help? [email protected]
Ready to put it on your website?
Install it with one line of code, the Google Tag Manager template or the WordPress plugin.