Plain HTML / static site
Paste one snippet in <head>, before any analytics tags.
Copy snippet from dashboard
After signing up, add your domain and copy the embed snippet from the dashboard.
<!-- Consentlane: cookie consent banner (GDPR) + Consent Mode v2 - paste in <head> before Google Analytics / GTM -->
<script>
window.dataLayer=window.dataLayer||[];window.gtag=window.gtag||function(){window.dataLayer.push(arguments)};
gtag('consent','default',{ad_storage:'denied',ad_user_data:'denied',ad_personalization:'denied',analytics_storage:'denied',wait_for_update:500});
window.uetq=window.uetq||[];window.uetq.push('consent','default',{ad_storage:'denied'});
</script>
<script async src="https://consentlane.com/v1/cl.js?s=YOUR_KEY"></script>
Paste in <head>
The snippet must sit BEFORE GA4 / Meta Pixel / Ads. The first part (inline) sets the Consent Mode v2 default „denied" state synchronously - it always wins the race against async tags. The second part loads the banner.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Your site</title>
<!-- ALWAYS at the top of head, before GA/GTM -->
<!-- Consentlane: cookie consent banner (GDPR) + Consent Mode v2 - paste in <head> before Google Analytics / GTM -->
<script>
window.dataLayer=window.dataLayer||[];window.gtag=window.gtag||function(){window.dataLayer.push(arguments)};
gtag('consent','default',{ad_storage:'denied',ad_user_data:'denied',ad_personalization:'denied',analytics_storage:'denied',wait_for_update:500});
window.uetq=window.uetq||[];window.uetq.push('consent','default',{ad_storage:'denied'});
</script>
<script async src="https://consentlane.com/v1/cl.js?s=YOUR_KEY"></script>
<!-- Analytics tags after -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXX"></script>
</head>
Verify in DevTools
Open Chrome DevTools → Application → Cookies. After clicking „Accept" you should see a cmp_consent cookie with your choice. In the Network tab you should see a POST to /v1/consent returning {ok: true, cid: "..."}.
Optional: your own „Cookie settings" link
By default a small floating button lets visitors reopen their choices. Want it in your footer or menu instead? Add the attribute data-cl-consent="settings" to any element - the script wires the click automatically (works for footers rendered later, SPAs, page builders). When at least one such element exists on the page, the floating button hides itself. Use data-cl-consent="open" to always reopen the full banner. For JS-driven triggers call window.cmpReopen() - guard it (if (window.cmpReopen) cmpReopen()) and avoid inline onclick (blocked by strict CSP).
<!-- Drop anywhere: footer, menu, settings page --> <button type="button" data-cl-consent="settings">Cookie settings</button> <!-- A link works too (no page jump): --> <a href="#" data-cl-consent="settings">Cookie settings</a>
Ready to try? The Free plan is enough to start.
Sign up