Skip to content

Installation

Add the <script> tag as the first element of your site’s <head>, loaded synchronously - no async, no defer - so it is in place before any tracker on the page can run. The script auto-mounts the banner.

Include it once per page. If a template adds it a second time, only the first copy runs and the browser console says so (Kookiok: consent.js is included more than once on this page), naming the domain group of the copy that runs and of the one that does not. Check those when a site has moved between domain groups: a stale tag left above the new one wins, and if its group does not list the site, no consent is recorded.

<head>
<script
id="Kookiok"
src="https://cdn.kookiok.com/consent.js?id=YOUR_DOMAIN_GROUP_ID"
></script>
<!-- everything else -->
</head>

Find your domainGroupId in the Kookiok admin dashboard at the top of any Domain Group page.

Framework integrations

Next.js, Nuxt, Astro, Remix, Gatsby, Vite, WordPress, Shopify, Wix, Webflow, Squarespace, raw HTML.

Verifying installation

Backend verifier: POST /api/v1/domain-groups/{id}/verify-installation runs 4 checks and reports script presence + version.

CDN + caching

cdn.kookiok.com (Azure Front Door) fronts the script: 1 hour at the CDN edge, 1 hour in the visitor’s browser. Publishing a change purges the edge automatically, so a visitor who has not cached the script picks it up within about 10 minutes. A visitor who already downloaded it keeps the previous version until their hour is up - allow up to 1 hour for a change to reach everyone.