The @laioutr-app/cookiebot package integrates Cookiebot into a Laioutr-powered Nuxt app for cookie consent management. It does not register any orchestr handlers; instead it adds a client plugin that registers a CookiebotAdapter with the Laioutr consent store (from @laioutr-core/frontend-core). The adapter loads the Cookiebot script, reads the consent cookie, maps Cookiebot’s categories to Laioutr’s ConsentManagementState, and exposes methods to show/renew the consent overlay and to check or react to consent changes.
Configuration is minimal: cbid (Cookiebot domain group ID) is required; consentMode and consentModeDefaults are optional and control Google Consent Mode v2 integration. All options are exposed in public runtime config so the client plugin can read them. The module installs @laioutr-core/frontend-core on prepare.
The module expects configuration under the key @laioutr-app/cookiebot in nuxt.config.ts (or via runtimeConfig). One option is required; two have defaults.
| Option | Type | Description |
|---|---|---|
cbid | string | Cookiebot domain group ID (CBID). Used to load the Cookiebot script from https://consent.cookiebot.com/uc.js?cbid={cbid}. Find it in your Cookiebot dashboard. |
consentMode | boolean | Enable Google Consent Mode v2. When true, the script tag gets data-consentmode (Cookiebot default). When false, the script gets data-consentmode="disabled". Default: true. |
consentModeDefaults | boolean | Enable default consent state for Google Consent Mode. When true, Cookiebot default applies. When false, the script gets data-consentmode-defaults="disabled". Default: true. |
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@laioutr-app/cookiebot'],
'@laioutr-app/cookiebot': {
cbid: process.env.COOKIEBOT_CBID!,
consentMode: true,
consentModeDefaults: true,
},
});
Use an environment variable for cbid in production if you prefer not to hardcode it; the value is public so it can be exposed to the client.
@laioutr-app/cookiebot, creates a CookiebotAdapter with that config, registers it with useConsentStore(), and activates it. The consent store is from @laioutr-core/frontend-core; other adapters or UI can use the same store.data-blockingmode="auto" and optional data-consentmode / data-consentmode-defaults. (2) Sets up useCookie for the CookieConsent cookie (decode parses Cookiebot’s JSON shape). (3) On the client, listens for CookiebotOnLoad and maps window.Cookiebot.consent to ConsentManagementState and notifies registered callbacks.false. getConsentState() returns this shape from the cookie or from window.Cookiebot.consent when available.This package does not provide orchestr queries, actions, links, or resolvers. It only adds Cookiebot as a consent adapter for the Laioutr consent store.
| Cookie | Purpose |
|---|---|
| CookieConsent | Set by the Cookiebot script. Contains the user’s consent choices (necessary, preferences, statistics, marketing, method, region, stamp, etc.). The adapter reads it to provide getConsentState(). |
@laioutr-app/cookiebot (e.g. from env).Battery Included
Developer documentation for the Laioutr Battery Included app package. Add search, suggested search, and product recommendations to your Laioutr frontend via the BatteryIncluded API.
Google Tag Manager (GTM)
Developer documentation for the Laioutr GTM app package. Add Google Tag Manager to your Nuxt app with consent integration and a tracking adapter for the Laioutr tracking store.