## Summary Closes #36. Helpers / consent gating already exist from [#42](#42). This PR adds **call sites** + docs: - `identifyAccount` + `AnalyticsSession` (identify on session; `Logout` when auth ends) - Auth: Sign In / Sign Up / AuthCallback (SSO) success & fail - Billing: Checkout started, Payment Success / Canceled - Chat: Conversation Created, Message Sent (metadata only — no prompt text) - ToS Acknowledged - `BILLING_PORTAL_OPENED` reserved until Account portal (#33) - Catalog: [`llm-fe/ANALYTICS.md`](llm-fe/ANALYTICS.md) No `chat_backend` changes required. ## Test plan - [ ] Grant consent on beta → sign in → Tianji shows Login Success + identify - [ ] Decline consent → same actions produce no custom events (page views still ok) - [ ] Sign up + checkout + cancel/success return URLs fire expected events - [ ] New chat + send message → Conversation Created / Message Sent without prompt text - [ ] Acknowledge ToS → ToS Acknowledged - [ ] `npm run test:ci -- --testPathPattern='analytics.test|SignIn.test|SignUp.test|AuthCallback.test'`Reviewed-on: #45
This commit was merged in pull request #45.
This commit is contained in:
@@ -229,6 +229,7 @@ See [server-infra IMPLEMENTATION.md](https://git.aimloperations.com/ai_ml_operat
|
||||
- **Custom events / identify** require analytics consent (`AnalyticsConsentBanner` + `trackEvent` / `identifyUser`)
|
||||
- Consent choice stored in `localStorage` key `hesychia_analytics_consent_v1` (`granted` / `denied`)
|
||||
- Banner links to `/terms_of_service/#analytics` for the always-on vs optional split
|
||||
- Event catalog: [`llm-fe/ANALYTICS.md`](llm-fe/ANALYTICS.md)
|
||||
|
||||
## Related repos
|
||||
|
||||
|
||||
Reference in New Issue
Block a user