← www.qpoint.io · c5
initial-prompt.md
c5 — Cookie Consent Audit
Raw Thinking
User reports that cookie consent seems to reset on every new release — users are re-prompted to accept cookies after deploys. Something is wrong with how consent decisions are persisted.
Current Implementation (as found)
Storage: localStorage with key qpoint-cookie-consentFormat: { version: "1.0", timestamp: <epoch>, accepted: true }Composable: useConsent.ts — plain function returning new ref() instances per call
Banner: CookieConsentBanner.vue — shows when !hasConsent && isInitializedGTM gating: useGTM.ts — watches consent, only loads GTM script when consent is true
Suspected Issues
- No shared state —
useConsent()creates freshref()on every call. Not using NuxtuseState()or a singleton pattern. Different components get different reactive state. - localStorage fragility — browsers can clear localStorage under storage pressure, Safari ITP restrictions, or "clear site data." Not as durable as cookies.
- No cookie-based fallback — consent stored only in localStorage, not in an actual cookie (which would survive more scenarios and be readable server-side for SSR).
- "Essential Only" is fake — both buttons call
acceptConsent()identically. No granular category support. - Version coupling — if
CONSENT_VERSIONever bumps, all stored consent is silently invalidated. No migration path.
What the User Wants
- Full audit of current consent system
- Explore better methods/alternatives
- Implement fixes
- Track as a proper cycle