Skip to content
npm package

Install COKIQ in Vue or Nuxt

Use the @cokiq/vue helper, a Nuxt client-side plugin, or the base HTML template, depending on your stack.

Install in 3 steps

  1. Install @cokiq/vue or add the universal script to the app template.
  2. For Nuxt, load COKIQ as a client-only plugin or app-level script.
  3. Build and test the live route output after deployment.

Package install

npm i @cokiq/vue

Universal script

Works on any site that allows custom code in the head. Replace YOUR_SITE_KEY with the key from your COKIQ dashboard. Use one install path per site.

<script src="https://cokiq.com/api/s/YOUR_SITE_KEY" data-key="YOUR_SITE_KEY" async></script>

Check that it works

  • The banner appears after hydration.
  • Route changes do not create duplicate COKIQ elements.
  • Consent actions are visible in the COKIQ dashboard.

Questions

Does COKIQ work with Nuxt server rendering?

Yes. Load it client-only, as a Nuxt plugin with mode client or an app-level script.