← Cycles
www.qpoint.io · c5

Cookie Consent Audit & Fix

activecreated 2026-05-21· last activity 2026-05-27

Audit and fix cookie consent persistence so decisions survive deploys

Why

Users are being re-prompted to accept cookies after every site release. The current implementation stores consent in localStorage via a custom composable that has several reliability issues — no shared state, fragile storage, and no fallback mechanism.

Objective

Consent decisions persist reliably across deploys, browser restarts, and normal browsing conditions. The banner only re-appears when consent genuinely expires (1 year) or the user clears it manually.

Scope

  • In: useConsent.ts, CookieConsentBanner.vue, useGTM.ts, gtm.client.ts, nuxt.config.ts
  • Out: Third-party consent platforms (OneTrust, Cookiebot), GDPR granular category UI (future cycle)

Key Changes

  • Rewrote useConsent.ts: replaced localStorage + ref() with useCookie() + useState()
  • Cookie qpoint-consent now persists consent (survives deploys, readable server-side)
  • useState() ensures all components share a single reactive state
  • Added one-time migration: reads old qpoint-cookie-consent from localStorage, writes to cookie, deletes old key
  • Simplified CookieConsentBanner.vue: removed redundant local ref and watchEffect
  • Updated DevDebugger.vue to read from cookie instead of localStorage
  • Removed stale consentGiven reference from useGTM.ts

Artifacts

Qpoint Brand Style Guide