Getting started
Installation
Install the CookieCrumb loader on any platform.
The loader is a single script tag that works anywhere you can edit HTML. Below are platform-specific notes.
Generic HTML
<script src="https://cookie-api.trishchuk.com/cdn/YOUR_SITE_ID/loader.js" defer></script>Next.js (App Router)
Use the next/script component with the beforeInteractive strategy inside your root layout.
import Script from "next/script";
export default function RootLayout({ children }) {
return (
<html>
<head>
<Script
src="https://cookie-api.trishchuk.com/cdn/YOUR_SITE_ID/loader.js"
strategy="beforeInteractive"
/>
</head>
<body>{children}</body>
</html>
);
}WordPress
Use the official CookieCrumb plugin: activate it, open Settings → CookieCrumb, and sign in — or paste your site ID if you would rather not connect an account. It does several things a bare script tag cannot:
- Prints the loader first in the head, before any analytics or marketing tag.
- Holds enqueued scripts until their category is granted — map them by handle on the settings screen.
- Publishes decisions to the WP Consent API, so consent-aware plugins follow the same answer.
- Answers the domain-ownership check with a meta tag or a .well-known file.
- Renders your generated cookie policy with the [cookiecrumb_cookie_policy] shortcode.
Without the plugin, paste the snippet into your theme's header.php before the closing </head> tag, or use a header-scripts plugin. Place it above any analytics plugins.
Drupal
Use the official CookieCrumb module (Drupal 10.2+ or 11). Enable it, open Configuration → System → CookieCrumb, and sign in or enter your site ID. It adds the loader ahead of every other asset, holds mapped libraries until consent, and ships blocks for your cookie policy and a preferences button.
drush en cookiecrumbShopify
Install the CookieCrumb app. It creates a site for your shop, then adds the loader through a theme app extension — no theme code to edit, and it survives theme changes. After installing, open the app and use “Enable in theme editor”: Shopify keeps app embeds switched off until you turn them on. The app requests no access scopes, so it never reads your orders or customers.
Without the app, open layout/theme.liquid in your theme editor and add the snippet inside the <head> block, then save.
Wix
Install the CookieCrumb app from the App Market. It reads your site's address, creates a CookieCrumb site for it, and injects the loader on every page. Publish your Wix site first — until it is published Wix reports no address, and the app will wait and offer a retry.