Skip to content

Consent gate for consent-requiring analytics providers #594

Closed as not planned

Description

@ralksta

Prerequisite for the consent-requiring providers in #486 (Google Analytics 4, Adobe Analytics, Microsoft Clarity, Meta Pixel, Hotjar). Those set cookies or fingerprint, so under GDPR they may not load before the visitor agrees.

The gate must be invisible unless it is needed. It renders only when the configured analytics.provider is marked consent: required. A default install has no banner, and neither does one using the cookieless providers (Plausible, Umami, GoatCounter, Fathom, Matomo, Pirsch, Cloudflare). The built-in counter stays cookieless and outside the gate.

What it has to do

  • Block script injection until acceptance — not load-then-disable. A gtag.js that has already run has already set its cookies.
  • Persist the decision client-side (a first-party cookie or localStorage), including a decline, so the banner does not reappear on every page.
  • Offer a genuine refusal, equally reachable as acceptance. A banner with only an "OK" is not consent.
  • Let the visitor revoke later — a link in the footer next to Impressum is the natural place, and legal.enabled already gates that area.
  • Stay accessible: focus trap while open, escapable, readable in both themes, and not a layout-shift bomb on mobile.

Fits the existing structure

Footer.tsx already carries the Impressum link behind legal.enabled; revocation belongs there. The gate text needs entries in lib/i18n/locales/{en,de}.ts — it is visitor-facing copy, so it must be translatable, not hardcoded.

Acceptance

  • No consent-requiring provider configured: nothing renders, no storage is written.
  • Provider configured, nothing decided yet: no third-party script in the DOM, no third-party cookie set.
  • After acceptance: script loads, decision survives a reload.
  • After refusal: still no script, decision survives a reload, and the visitor can change their mind from the footer.

Effort: M.

Split out of #486 so the provider mechanism and the consent flow can be tested independently.

Activity

  1. added this to the v0.17.0 milestone on Sep 20, 2026
  2. ralksta commented on Oct 2, 2026

    @ralksta
    OwnerAuthor

    Closing as not planned. Folio's analytics is cookieless by design and the privacy page states that no tracking services are used. A consent gate only exists to support providers that set cookies or need consent (GA4, Clarity, Meta, Hotjar), and shipping one would mean the project implicitly vouching for GDPR/TTDSG-compliant consent handling: load-before-consent and unequal refusal are the usual failures, and every deployment would inherit them.

    If #486 is picked up, the plan is to support only cookieless providers (Plausible, Umami, GoatCounter, Pirsch and similar), which need no consent gate. This can be reopened if a concrete need for a consent-requiring provider comes up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions