diff --git a/README.md b/README.md index 3178173..a71e699 100644 --- a/README.md +++ b/README.md @@ -1796,6 +1796,64 @@ session (low-stock digest, stale-unverified-accounts report, weekly revenue report, expired-discount-code cleanup) needed no monitor changes of their own; see the Payload README's "Jobs Queue" section. +## Cookie consent, tracking codes & back-in-stock notifications + +**Cookie consent** (added 2026-08-01) uses **Klaro** (`kiprotect/klaro`, +npm, self-hosted, open source) — a first hand-rolled `CookieBanner.tsx`/ +`useConsent.ts`/`TrackingScripts.tsx` trio shipped the same day, then was +replaced with Klaro after real per-service consent lists and bundled +legally-grade German translations were judged worth the swap over +building all of that by hand. `no @types/klaro` package exists — +`types/klaro.d.ts` declares only the small surface actually used +(`setup`/`show`). + +- `app/lib/klaroConfig.ts` — builds Klaro's config object dynamically + from the Payload backend's `tracking-codes` collection (see that + repo's README): one Klaro "service" per row, `purposes: [consentCategory]`. + Brand colors applied via Klaro's CSS-custom-property `styling` + overrides (`green1`/`red1`/`blue1`/`dark1`/`light1` etc. — confusingly + named: `dark1`/`light1` are the notice's background/text colors, not a + dark-mode switch; `blue1` colors the modal's "Einstellungen" button and + is easy to miss since it only shows once the modal itself opens, not + just the notice). Theme: compact bottom-left corner notice + (`theme: ["light", "bottom", "left"]`, `notice-max-width: 380px`), not + Klaro's full-width `wide` default. +- `app/lib/loadTrackingCode.ts` — the actual `