← 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: replacedlocalStorage+ref()withuseCookie()+useState() - Cookie
qpoint-consentnow persists consent (survives deploys, readable server-side) useState()ensures all components share a single reactive state- Added one-time migration: reads old
qpoint-cookie-consentfrom localStorage, writes to cookie, deletes old key - Simplified
CookieConsentBanner.vue: removed redundant local ref and watchEffect - Updated
DevDebugger.vueto read from cookie instead of localStorage - Removed stale
consentGivenreference fromuseGTM.ts