Configuration
Now that the Cookiebot package is installed, we need to add some global configuration to your app.
Don't forget to regenerate the .nuxt folder after installation and .env alteration!
Basic installation
The basic and required configuration can be done as follows:
Module options nuxt.config.ts
export default defineNuxtConfig({
modules: ["@ambitiondev/nuxt-cookiebot"],
cookiebot: {
cookieBotId: 'COOKIEBOT_ID_HERE',
},
});
.env usage
Nuxt comes with built-in .env support, so you can easily use it like this:
.env
COOKIEBOT_ID=supersecret