feat(website): implement PDPA cookie consent banner and script manager #14

Merged
admin merged 1 commits from feat/website-cookie-consent into master 2026-10-18 22:51:48 +00:00

Overview

Implement PDPA & GDPR compliant Cookie Consent Management Platform (CMP) for pps/website:

  • Zustand Store (cookieConsentStore.ts): Stores consent record (
    ecessary, nalytics, marketing) in localStorage with skipHydration: true for Next.js SSR safety.
  • Cookie Banner (CookieBanner.tsx): Fixed bottom floating banner with Quiet Luxury styling, providing Accept All, Reject Non-Essential, and Customize buttons.
  • Preferences Modal (CookiePreferencesModal.tsx): Detailed modal dialog allowing users to granularly toggle Analytics and Marketing cookies (Strictly Necessary is locked).
  • Script Manager (ScriptManager.tsx): Coordinates Google Consent Mode v2 (nalytics_storage, d_storage), conditionally injects GA4, Meta Pixel, and TikTok Pixel, and dispatches homaroma:consent-change DOM events.
  • Footer Revocation Link: Added Cookie Preferences link in the Support column of Footer.tsx so users can modify/revoke consent anytime.
  • Multilingual Support: Added localized text for TH, EN, JA, and ZH.
### Overview Implement PDPA & GDPR compliant Cookie Consent Management Platform (CMP) for pps/website: - **Zustand Store (cookieConsentStore.ts):** Stores consent record ( ecessary, nalytics, marketing) in localStorage with skipHydration: true for Next.js SSR safety. - **Cookie Banner (CookieBanner.tsx):** Fixed bottom floating banner with Quiet Luxury styling, providing Accept All, Reject Non-Essential, and Customize buttons. - **Preferences Modal (CookiePreferencesModal.tsx):** Detailed modal dialog allowing users to granularly toggle Analytics and Marketing cookies (Strictly Necessary is locked). - **Script Manager (ScriptManager.tsx):** Coordinates Google Consent Mode v2 (nalytics_storage, d_storage), conditionally injects GA4, Meta Pixel, and TikTok Pixel, and dispatches homaroma:consent-change DOM events. - **Footer Revocation Link:** Added Cookie Preferences link in the Support column of Footer.tsx so users can modify/revoke consent anytime. - **Multilingual Support:** Added localized text for TH, EN, JA, and ZH.
antigravity-bot Bot added 1 commit 2026-10-18 22:46:56 +00:00
- Add cookieConsentStore using Zustand with localStorage persistence and skipHydration
- Implement responsive CookieBanner with Quiet Luxury design and PDPA compliance
- Implement CookiePreferencesModal with category toggles (Necessary, Analytics, Marketing)
- Implement ScriptManager for Google Consent Mode v2, GA4, Meta Pixel, and TikTok Pixel orchestration
- Add Cookie Preferences trigger in Footer support column
- Add multilingual translation keys for Thai, English, Japanese, and Chinese
admin merged commit b27afb4561 into master 2026-10-18 22:51:48 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/homaroma#14