Configuration

Learn how to configure Docus.

Minimal Module Configuration
export default defineNuxtConfig({
  ...
  cookieFirst: {
      apiKey: "YOUR_API_KEY", //recommended via .env File
  }
  ...
})
Full Module Configuration
export default defineNuxtConfig({
  ...
  cookieFirst: {
      apiKey: "YOUR_API_KEY", //recommended via .env File
      host: "YOUR_HOST", //optional - auto detected if not set
      stealthMode: false,
      silentMode: false,
      language: null, 
      resetTabIndex: false,
      useEuropeanCDN: true
  }
  ...
})
Multi Domain Configuration
export default defineNuxtConfig({
  ...
  cookieFirst: {
    sites: [
      {
        apiKey: "YOUR_API_KEY_A", //recommended via .env File
        host: "YOUR_HOST_A", //recommended via .env File
      },
      {
        apiKey: "YOUR_API_KEY_B", //recommended via .env File
        host: "YOUR_HOST_B", //recommended via .env File
      }
    ]
  }
  ...
})
KeyTypeDefaultDescription
apiKeystringnullThe API Key for your Cookie First Banner
hoststringnullThe website host for your Cookie First Banner (e.g "my-domain.com")
stealthModebooleanfalseDeactivates the banner and only enables cookie rendering component
silentModebooleanfalseDeactivates all browser/console information
languagestringnullISO-639-1 Lang code for the banner language. If no langauge is set, the browser language is used.
resetTabIndexbooleanfalseResets the Tab Index of all banner elemments to zero (tabindex=0 | Default is tabindex=1) Useful if you need to get some more lighthouse accessibily score points.
useEuropeanCDNbooleantrueIf the European CDN should be used. If set to false, the global CDN of CookieFirst is used.
sitesArraynullArray of site configurations for multi-domain setups. Each site object supports the same options as in single domain setup (see above).