← 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

  1. No shared state — useConsent() creates fresh ref() on every call. Not using Nuxt useState() or a singleton pattern. Different components get different reactive state.
  2. localStorage fragility — browsers can clear localStorage under storage pressure, Safari ITP restrictions, or "clear site data." Not as durable as cookies.
  3. 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).
  4. "Essential Only" is fake — both buttons call acceptConsent() identically. No granular category support.
  5. Version coupling — if CONSENT_VERSION ever 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

Qpoint Brand Style Guide