Configure your banner and copy the code. 100% free, GDPR-first, with Google Consent Mode v2 and GPC signal support (CCPA).
UK GDPR-grade opt-in: 35 third-party services blocked before consent, Consent Mode v2, 30 languages, readable unminified source.
No configuration needed — WebLegal CCB detects and manages these third-party services according to the visitor's choice.
Paste this code first in the <head> section of your site, before all other scripts, so that cookie detection and blocking works correctly. Never through a tag manager or a dynamic loader, and never with defer or async: the banner must run before the trackers, otherwise it can no longer block anything.
<script src="https://weblegal.ai/js/wl-cookie-consent.js" data-position="popup" data-color="#10b981"></script> The code Google Analytics or Meta ask you to paste sits directly in the HTML. The browser downloads it while reading the page, before the banner can act: no cookie is set, but your visitor's IP address has already left. Neutralise the tag by changing its type — the banner restores it on acceptance. before <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXX"></script> after <script type="javascript/blocked" data-wl-src="https://www.googletagmanager.com/gtag/js?id=G-XXX"></script>
What the banner does not do. It acts on scripts and iframes: image pixels, fetch/XHR requests and server-side tracking are not covered. And an SDK installed via npm cannot be blocked by any banner, ours or anyone else's.
A consent banner is essential, but it must be paired with a detailed cookie policy explaining which cookies you use, why, and how visitors can manage them. This is a legal requirement (GDPR, ePrivacy).
Generate my cookie policy with WebLegal