Tutte le integrations
V

BISC8 + Vue / Nuxt

Inject in main.ts / nuxt.config — composable-friendly.

BISC8 + Vue / Nuxt: composable wrapper exposes consent state reactively.

Gratis €0/mese · Nessuna carta richiestaInizia gratisVedi setup

Perché BISC8 per Vue / Nuxt

Composable API

useBisc8() composable returns reactive consent state. Component re-renders on grant/revoke automatically.

Nuxt SSR safe

Script injected client-side only — no SSR mismatch. process.client guard ships zero bytes server-render.

Vue 2 + Vue 3 ready

Same DOM-level snippet works for both versions. No framework lock-in.

Setup (4 passi)

  1. 1. Vue: add to main.ts

    Paste the snippet right after createApp(). For Nuxt, use plugins/bisc8.client.ts (note .client suffix).

  2. 2. Register data-domain

    Replace example.com with your hostname (no protocol).

  3. 3. Add composable (optional)

    Create composables/useBisc8.ts wrapping window.bisc8 with Vue reactive(). Sample in BISC8 docs.

  4. 4. Build + deploy

    npm run build → upload dist/.

Snippet di codice

Sostituisci example.com con il tuo dominio BISC8 registrato.

// main.ts — Vue 3 / Nuxt
if (typeof window !== 'undefined') {
  const s = document.createElement('script');
  s.async = true;
  s.src = 'https://cdn.bisc8.app/v1/boot.js';
  s.setAttribute('data-domain', 'example.com');
  document.head.appendChild(s);
}

Risoluzione problemi

SSR mismatch in Nuxt

Use plugins/bisc8.client.ts — the .client suffix tells Nuxt to skip server execution.

Vite dev HMR loses banner

Add id check (existing in snippet for React) to prevent re-injection on every hot reload.

Pinia store consent state

Subscribe to window.bisc8.on("change", fn) and mutate Pinia store. Then components react automatically.

Guide correlate

Pronto al lancio?

Crea un account in 30 secondi, copia lo snippet, banner live in 60s totali.

Inizia gratis con Vue / Nuxt