Overview
Next.js adapter: post-purchase rollout
Use this guide after payment to move from ZIP download to a tested Next.js production integration.
- • Download `platform-cookie-core.zip` from the customer area.
- • Copy the plain adapter and shared assets into `public/`.
- • Register each live hostname in billing.
- • Load and boot the runtime from `app/layout.tsx` with `siteKey` and `verifyUrl`.
- • Validate localized policy routes, consent state, and audit behavior.

Step 1
Serve the assets from `public/`
The root layout should be able to load the shared CSS and runtime assets across all routes and locales.
Code snippet
public/headless-bootstrap.js
public/cookie-consent.js
public/cookie-consent-ui.js
public/cookie-consent-scanner.js
public/cookie-consent.cssStep 2
Boot the runtime from the root layout
Keep the consent layer globally available in App Router by loading the adapter from the root layout.
Code snippet
window.CookiezyPlainAdapter.boot({
locale: "en",
policyUrl: "/en/cookie-policy",
siteKey: "pk_live_cookiezy_demo",
verifyUrl: "https://cookiezy.com/api/licensing/verify"
});Step 3
Validate routing, audit, and licensing
Run the same checks on homepage, pricing, and policy routes before launch.
- • Banner appears on first visit.
- • Localized routes keep the correct policy page URL.
- • Policy page audit mounts and re-scan works.
- • Optional analytics starts only after consent.
- • Verification endpoint returns `allowed: true` for each live hostname.