Add cookie / analytics consent banner #37

Closed
opened 2026-07-27 04:19:08 -07:00 by westfarn · 0 comments
Owner

Summary

Follow-on from beta / Tianji work (#35): add a cookie / analytics consent UX for Hesychia, modeled on dta_webapp AnalyticsConsentBanner.

Users need a clear grant/deny choice for behavioral analytics; copy should match Hesychia branding and Terms.


Context

No consent banner or consent storage exists in llm-fe today. Tracker loads whenever the production build runs.

Desired policy (align with DTA after #46 unless legal says otherwise):

Path Pending / Denied Granted
Tianji automatic page views
Tianji custom events / identify
Consent banner Show until resolved Hidden

(No advertising cookies; JWT auth already avoids cookie-based session — this is analytics consent, not auth cookies.)


Requirements

  • Consent banner (Accept / Decline) on prod + beta
  • Persist choice in localStorage (or equivalent) with a versioned key
  • Context/hook so Tracker + event helpers can read consent
  • Link to Terms / privacy section explaining what is always collected vs consent-gated
  • Hesychia / hesychia.ai copy (not DTA "RealPath" leftovers)
  • Accessible: dialog role, keyboard, mobile-friendly
  • Do not set SDK "disable all analytics" flags that kill page views if policy says page views always on

Tests

  • Banner shows when unsettled; hidden after accept/decline
  • Consent helpers return correct state

Acceptance criteria

  • Banner appears on first visit to prod/beta until user chooses
  • Choice persisted and respected across reloads
  • Custom events gated once event-tracking ticket lands; page views still load per policy
  • Copy references Hesychia ToS / analytics section
  • Unit tests for consent helpers + banner visibility

Depends on / related

  • #35 Tianji baseline on beta/prod
  • Event tracking follow-on (consumes consent)
  • Terms of service page follow-on (legal copy link target)

References

  • dta_webapp AnalyticsConsentBanner.tsx, analyticsConsent.ts, dta_webapp#46
## Summary Follow-on from beta / Tianji work ([#35](https://git.aimloperations.com/ai_ml_operations/chat_web_app/issues/35)): add a **cookie / analytics consent** UX for Hesychia, modeled on `dta_webapp` `AnalyticsConsentBanner`. Users need a clear grant/deny choice for behavioral analytics; copy should match Hesychia branding and Terms. --- ## Context No consent banner or consent storage exists in `llm-fe` today. Tracker loads whenever the production build runs. Desired policy (align with DTA after #46 unless legal says otherwise): | Path | Pending / Denied | Granted | |------|------------------|---------| | Tianji automatic page views | ✅ | ✅ | | Tianji custom events / identify | ❌ | ✅ | | Consent banner | Show until resolved | Hidden | (No advertising cookies; JWT auth already avoids cookie-based session — this is analytics consent, not auth cookies.) --- ## Requirements - Consent banner (Accept / Decline) on prod + beta - Persist choice in `localStorage` (or equivalent) with a versioned key - Context/hook so Tracker + event helpers can read consent - Link to Terms / privacy section explaining what is always collected vs consent-gated - Hesychia / hesychia.ai copy (not DTA "RealPath" leftovers) - Accessible: dialog role, keyboard, mobile-friendly - Do **not** set SDK "disable all analytics" flags that kill page views if policy says page views always on ### Tests - Banner shows when unsettled; hidden after accept/decline - Consent helpers return correct state --- ## Acceptance criteria - [ ] Banner appears on first visit to prod/beta until user chooses - [ ] Choice persisted and respected across reloads - [ ] Custom events gated once event-tracking ticket lands; page views still load per policy - [ ] Copy references Hesychia ToS / analytics section - [ ] Unit tests for consent helpers + banner visibility ## Depends on / related - #35 Tianji baseline on beta/prod - Event tracking follow-on (consumes consent) - Terms of service page follow-on (legal copy link target) ## References - `dta_webapp` `AnalyticsConsentBanner.tsx`, `analyticsConsent.ts`, dta_webapp#46
westfarn self-assigned this 2026-07-27 04:19:08 -07:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/chat_web_app#37