Skip to content
Back to Documentation

COKIQ docs

Next.js Setup

Install COKIQ in Next.js layouts and verify consent behavior across app routes, marketing pages, and scripts.

Best for

Next.js developers and SaaS teams.

Setup steps

Step 1

Add the script in the app shell

Install COKIQ once in the root layout or marketing shell so it is not duplicated across routes.

Step 2

Keep site key environment-aware

Use the production COKIQ site key for production domains and separate keys for test domains if needed.

Step 3

Coordinate analytics scripts

Review GA4, GTM, Meta Pixel, and other script loading so consent choices are respected.

Step 4

Test static and dynamic routes

Check homepage, pricing, docs, blog, dashboard entry routes, and key conversion pages.

Implementation checklist

  • Single root install
  • Correct production site key
  • No hydration warnings from script markup
  • Consent state persists across route changes
  • Consent Mode events are tested if used

FAQ

Where should COKIQ be installed in Next.js?

Install it once in the root layout or a shared shell used by public website routes.

Does COKIQ replace legal review?

No. It supports technical consent operations and evidence; legal copy still needs qualified review.