Skip to content

markus-gx/nuxt-cookie-first

Repository files navigation

Nuxt Cookie First

npm version npm downloads License Nuxt

Nuxt Cookie First

Nuxt Cookie First is a powerful and easy-to-use Nuxt.js module that seamlessly integrates CookieFirst, a GDPR and CCPA compliant cookie consent solution, into your Nuxt.js application. This module enables developers to manage cookies and user consent with minimal effort while providing an optimal user experience.

Links

Quick Setup

  1. Add nuxt-cookie-first dependency to your project
# Using pnpm
pnpm add nuxt-cookie-first

# Using yarn
yarn add nuxt-cookie-first

# Using npm
npm install nuxt-cookie-first
  1. Add nuxt-cookie-first to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    'nuxt-cookie-first'
  ],
  cookieFirst: {
    // Options
    apiKey: 'YOUR_API_KEY',
    resetTabIndex: false, //If the tabindex of the elements inside the cookie banner layer should be reset to 0
    stealthMode: false, //default false
    silentMode: false, //default false
    language: 'YOUR_DEFAULT_LANGUAGE', //default null
    useEuropeanCDN: true //default true - If the European CDN should be used
  }
})

That's it! You can now use Nuxt Cookie First in your Nuxt app ✨