CookiezyCookiezy
ProductPlatformsDocsPricingBlogContact
  1. Home/
  2. Docs/
  3. React Adapter Setup

Documentation last updated May 29, 2026

Docs navigation

Overview

DocsDeveloper-first documentation for installing, configuring, and verifying Cookiezy across every supported adapter.Getting StartedCheck readiness, generate the right package, then ship the core flow.InstallationInstallation follows the same core pattern everywhere: generate the issued package, register the hostname, install the adapter, and validate runtime verification before launch.ConfigConfiguration keeps locale, policy, categories, layout, and licensing context in sync.

Reference

APIDeveloper-facing runtime methods, browser events, and verification-aware integration notes.

Adapters

Webflow Adapter SetupTechnical Webflow setup guide for Cookiezy: what you receive after purchase, where each file goes, and how to validate the runtime on a published Webflow site.Shopify Adapter SetupTechnical Shopify setup guide for Cookiezy: download Platform Core, deploy the theme app extension, expose the Theme Editor fields, and validate storefront consent behavior before publish.Wix Adapter SetupTechnical Wix setup guide for Cookiezy: install the private or unlisted Wix app, connect the correct Cookiezy account, publish the app-hosted runtime, and keep custom code only as a fallback.Hugo Adapter SetupTechnical Hugo setup guide for Cookiezy: generate the dedicated Hugo package, copy the issued config scaffold, align locale routes, and validate banner plus cookie audit behavior.Headless Adapter SetupTechnical headless setup guide for Cookiezy: boot the plain adapter, wire runtime verification, and validate the audit, settings, and restricted-mode recovery flow in custom frontends.WordPress Adapter SetupTechnical WordPress setup guide for Cookiezy: upload the plugin ZIP, configure licensing-aware settings, and validate shortcode-based settings and audit behavior.React Adapter SetupTechnical React setup guide for Cookiezy: load the plain adapter from the app shell, gate optional services with consent state, and validate SPA behavior.Next.js Adapter SetupTechnical Next.js setup guide for Cookiezy: load the plain adapter from the root layout, keep policy routing localized, and validate consent gating across App Router pages.Strapi Adapter SetupTechnical Strapi setup guide for Cookiezy: keep the runtime on the frontend, use Strapi as a configuration bridge, and map locale-aware policy URLs through the shared core model.DatoCMS Adapter SetupTechnical DatoCMS setup guide for Cookiezy: keep the visitor-facing runtime in the frontend app, use Platform Core for runtime assets, and use the standalone DatoCMS plugin only for editor-side configuration and generated frontend config preview.
Adapter versioningReact adapter

React adapter release status

Current React rollout version and notes for the plain adapter shipped inside Platform Core.

Current version

0.1.23

Delivery lane

Included in Platform Core

Compatibility notes

React still uses the plain adapter lane from Platform Core rather than a separate React-specific package.

Key rollout changes

1. Load the adapter once from the app shell.

2. Use `window.Cookiezy.setLocale(...)` after client-side locale changes.

3. Keep the policy audit mounted on the policy route.

Overview

React adapter: post-purchase rollout

Use this guide after payment to move from ZIP download to a tested React integration.

  • • Download `platform-cookie-core.zip` from the customer area.
  • • Copy the plain adapter and shared assets into `public/` or your CDN.
  • • Register the live hostname in billing.
  • • Load the runtime once from the React shell and boot it with a `license` object that includes `siteKey`, `verifyUrl`, and `billingUrl`.
  • • Validate SPA navigation, consent state, and audit behavior.
Developer documentation screenshot for the Cookiezy React adapter showing shell bootstrap and consent-aware runtime gating.
React technical reference: global shell bootstrap and consent-aware analytics gating.
Step 1

Serve the assets globally

Place the plain adapter files and shared assets where the React app can serve them globally from the shell.

Code snippet

public/cookiezy-plain-adapter.js
public/cookie-consent.js
public/cookie-consent-ui.js
public/cookie-consent-scanner.js
public/cookie-consent.css
Step 2

Boot Cookiezy from the shell

Boot the adapter before optional integrations run. Include the site key and verify URL in production.

Code snippet

window.CookiezyPlainAdapter.boot({
  locale: currentLocale,
  defaultLocale: "en",
  localeRoutes: {
    en: { policyUrl: "/en/cookie-policy", pathPrefixes: ["/en"] },
    sl: { policyUrl: "/sl/politika-piskotkov", pathPrefixes: ["/sl"] }
  },
  storageKey: "cookiezy_react_v1",
  license: {
    siteKey: "ck_live_cookiezy_demo",
    verifyUrl: "https://cookiezy.com/api/licensing/verify",
    billingUrl: "https://cookiezy.com/en/billing"
  }
});
Multilang

Bind Cookiezy to the same locale source as your React router

In React apps, use the same locale variable that drives your route layer or i18n provider. The shared core will then resolve the correct messages and policy page for the active locale.

  • • For router-driven locales, pass `locale` explicitly from the current route.
  • • Keep `localeRoutes` as the source of truth for locale-specific policy URLs.
  • • If your app can switch locale client-side without a full page reload, call `boot()` again with the new locale before opening the settings modal.
SPA locale switch

Update the banner language without reloading the page

If the React app switches locale client-side, you can update Cookiezy in place instead of reloading the page. This refreshes the banner copy, modal copy, and policy link for the new locale.

Code snippet

window.Cookiezy.setLocale("sl", {
  localeRoutes: {
    en: { policyUrl: "/en/cookie-policy", pathPrefixes: ["/en"] },
    sl: { policyUrl: "/sl/politika-piskotkov", pathPrefixes: ["/sl"] }
  },
  license: {
    billingUrl: "https://cookiezy.com/sl/billing"
  }
});
Step 3

Gate integrations and test SPA behavior

Optional analytics and marketing services must wait for consent, even after route changes.

  • • Banner appears on first visit.
  • • Consent state survives client-side navigation.
  • • Optional analytics starts only after explicit consent.
  • • Policy page audit mounts correctly on the policy route.
  • • Verification endpoint returns `allowed: true` on the live hostname.
  • • If billing is inactive or the hostname is not registered, the runtime falls back to necessary-only restricted mode.
Cookiezy

Lightweight consent platform for modern websites.

Product

FeaturesPlatformsPricingDocsBlogContact

Legal

Cookie PolicyPrivacy PolicyTerms

Language

English
EnglishenSlovenščinaslHrvatskihrItalianoit

Privacy controls

© 2026 Cookiezy. All rights reserved.