feat(privacy): grant/withdraw analytics consent from the privacy policy#14
Merged
Conversation
Add a "Manage your consent" section to the privacy page with a button to grant or withdraw analytics consent at any time, wired to the same consent store as the cookie banner: - ConsentControls: client component showing the current choice and a grant/withdraw button. Changing it takes effect immediately and persists. - analytics: register the GA id (setGaId) and toggle Google Analytics' official ga-disable-<id> flag on consent changes, so an already-loaded GA stops sending the moment consent is withdrawn and resumes on re-grant. - CookieConsent registers the GA id. - Privacy policy texts updated for all locales (en/de/es/fr): the analytics section now describes consent gating and points to the controls below; added the manage section strings; bumped the last-updated date. Supersedes #13 (the standalone GA-text update is folded in here). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was
Fügt der Datenschutzerklärung einen Abschnitt „Einwilligung verwalten" mit Button zum Erteilen oder Widerrufen der Analyse-Einwilligung hinzu, angebunden an denselben Consent-Store wie das Banner.
ConsentControls(neu) — Client-Komponente auf/privacy: zeigt die aktuelle Wahl und einen Button (bei erteilt → „Einwilligung widerrufen", sonst → „Analyse akzeptieren"). Änderung wirkt sofort und wird gespeichert.analytics.ts— registriert die GA-ID (setGaId) und schaltet Googles offizielles Opt-out-Flagga-disable-<id>bei Consent-Änderungen. So hört ein bereits geladenes GA sofort auf zu senden, sobald widerrufen wird, und nimmt bei erneuter Zustimmung wieder auf.CookieConsentregistriert die GA-ID.lastUpdatedauf Juli 2026.Verhältnis zu #13
Diese PR ersetzt #13: die dortige reine GA-Text-Aktualisierung ist hier enthalten (und weiter verfeinert, da der Text jetzt auf den neuen Button verweist statt auf „Websitedaten löschen"). Empfehlung: #13 schließen und diese PR mergen.
Verifikation
ga-disable-Flag toggelt korrekt bei grant/withdraw; plus die bestehenden (kein Senden vor Consent, Nachlieferung, Decline, Persistenz).next start(Build mit Test-GA-ID) gerendert:/privacy(en + de-Cookie) zeigt Manage-Sektion, Status, Button und den aktualisierten GA-Text; keingoogletagmanagervor Consent.tsc✓,eslint✓,next build✓. 38 vorbestehendeReact.act-Testfehler unverändert, keine neuen.Hinweis: Einen echten Klick-Durchlauf im Browser konnte ich hier nicht ausführen (kein Browser-Tool in dieser Session); die Consent-/GA-Disable-Logik ist per Unit-Tests abgesichert.
Generated with Claude Code