Install guide

1. Add the snippet

Copy the script tag from your site's Install tab and place it in <head> on every page, before other scripts. Works on any CMS: paste it into the theme header, a "custom code" field, or Google Tag Manager as a custom HTML tag fired on all pages (though placing it directly in the page is better).

2. Block scripts until consent

<script type="text/plain" data-ck="analytics" data-src="https://www.googletagmanager.com/gtag/js?id=G-XXXX"></script>
<script type="text/plain" data-ck="analytics">
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date()); gtag('config', 'G-XXXX');
</script>

Categories: preferences, analytics, marketing. Iframes: replace src with data-ck-src and add data-ck="marketing".

3. Google Consent Mode v2

If you load Google tags through Tag Manager and prefer not to block them, leave Consent Mode enabled (default). The banner pushes consent default with everything denied before your tags load, then consent update when the visitor chooses. Tag Manager and gtag.js read these automatically.

4. Reopen the banner

Add a footer link with href="#consent", or any element with data-ck-open. Programmatic: ConsentKit.show(), ConsentKit.get() returns the current choices, ConsentKit.reset() clears them.

5. React to consent in your own code

window.addEventListener('ck:consent', (e) => {
  if (e.detail.marketing) loadChatWidget();
});

The <html> element also carries data-ck-consent="necessary analytics" for CSS hooks.

Storage

Choices live in a first-party cookie ck_consent for 182 days. Changing texts or settings bumps the version, and visitors are asked again. Each choice is recorded on our side as a daily-rotating hash, the choices, the country and the config version, which is what you need to demonstrate consent.