libconsent
Adapters

Cookiebot

Cookiebot, including writing consent back from your own UI.

bun add @libconsent/cookiebot
import { cookiebot } from "@libconsent/cookiebot";

<ConsentProvider
  adapter={cookiebot({ cbid: "00000000-0000-0000-0000-000000000000" })}
>
  {children}
</ConsentProvider>;

Cookiebot's four categories line up with libconsent's, and it exposes submitCustomConsent. That makes it the one third-party platform where useConsentForm() and the shadcn banner can write to the platform's own consent record.

Options

OptionDefault
cbid—Required. The Domain Group ID.
blockingMode—"auto", "manual" or "none". See below.
culture—Force a language, e.g. "de".
region"com""eu" for the EU CDN.
manualfalseThe script is already on the page.

Categories

necessary   → essential
preferences → functional
statistics  → analytics
marketing   → marketing

Blocking mode

Leave blockingMode off in most cases. Cookiebot's automatic blocker rewrites third-party script tags before they run, which overlaps with what <CookieService> already does, and having both act on the same tag is hard to reason about.

Turn it on for scripts outside React's reach that you can't gate any other way.

Using your own banner

<ConsentProvider adapter={cookiebot({ cbid, blockingMode: "none" })}>
  {children}
  <ConsentBanner />
</ConsentProvider>

Saving writes back to Cookiebot's own record, so its scanner, logs and audit trail stay in place. Per-service switches don't appear, since Cookiebot takes category-level answers only.

Hide Cookiebot's own dialog in the Cookiebot dashboard if you render your own, or your users get two banners.

On this page