← All integrations
Next.js setup
Install COKIQ in Next.js
Use the Next.js helper package or next/script in app/layout.tsx or pages/_app.tsx.
npm package live
Package install
npm i @cokiq/next
Universal script
Use this fallback on any site that supports custom HTML. Replace YOUR_SITE_KEY with the key generated in the COKIQ dashboard.
<script src="https://cokiq.com/api/s/YOUR_SITE_KEY" data-key="YOUR_SITE_KEY" async></script>
Install steps
- Install @cokiq/next or import Script from next/script.
- Place the COKIQ loader in the root layout so it runs across the site.
- Use the production site key and load afterInteractive unless your setup requires a different timing.
- Build and deploy, then verify on the final public domain.
Verify after install
- ✓The production HTML includes the COKIQ loader path.
- ✓The banner loads once across route transitions.
- ✓Consent evidence appears in the COKIQ dashboard.