Skip to content

FEAT: Cookie consent banner (GDPR / ePrivacy gate) #236

Description

@Arnimag

User Story

In order to make an informed choice about how my data is used
As a first-time visitor to the store from the EU
I want to see a clear cookie consent banner that lets me accept, reject, or customise cookie categories before any non-essential scripts are loaded

Acceptance Criteria

  • 1. On my first visit, a cookie consent banner appears before any non-essential cookies are set.
  • 2. The banner clearly explains that the site uses cookies and provides options to accept all, reject all, or customise preferences.
  • 3. Accepting all cookies saves my preference and dismisses the banner for future visits.
  • 4. Rejecting all cookies dismisses the banner and prevents non-essential cookies from being set.
  • 5. If I customise preferences, I can toggle individual cookie categories (e.g. analytics, marketing) on or off and save my choice.
  • 6. My consent choice persists across sessions — I am not shown the banner again until my preference expires or I reset it.
  • 7. I can review and change my cookie preferences at any time (e.g. via a link in the footer).
  • 8. The banner copy is shown in the active language.
  • 9. The banner is the first focusable element when it appears — focus moves into it.
  • 10. All buttons and toggles in the banner are keyboard-operable.
  • 11. All banner copy, button labels, and category descriptions translated.

Background & Resources

Details: Consent preferences stored in a cookie or localStorage. Banner shown only if no consent cookie exists. Non-essential scripts (analytics, marketing tags) gated on consent state (see cookie-consent/analytics-gate). Consent expiry follows legal requirements (typically 12 months in the EU).

Key files:

  • apps/presentation/features/cookie-consent/cookie-banner.tsx — banner UI component
  • apps/presentation/features/cookie-consent/use-consent.ts — consent state management hook
  • apps/presentation/app/[locale]/layout.tsx — mounts <CookieBanner>
    Links/Screenshots: (Drag and drop images or paste links here)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions