From 8e9aef60f6defa01afece741f741be7149adc66a Mon Sep 17 00:00:00 2001 From: Cyrus Gray <144336577+graycyrus@users.noreply.github.com> Date: Wed, 13 May 2026 00:20:49 +0530 Subject: [PATCH] feat(analytics): implement Google Analytics (#1533) --- .claude/memory.md | 8 + app/.env.example | 5 + app/package.json | 1 + app/src/App.tsx | 6 + .../settings/panels/PrivacyPanel.tsx | 7 +- .../components/skills/InstallSkillDialog.tsx | 4 + .../skills/UninstallSkillConfirmDialog.tsx | 2 + app/src/features/privacy/whatLeavesItems.ts | 2 +- app/src/main.tsx | 9 +- app/src/pages/Accounts.tsx | 2 + app/src/pages/Conversations.tsx | 2 + app/src/pages/onboarding/OnboardingLayout.tsx | 4 + .../pages/onboarding/pages/ContextPage.tsx | 8 +- app/src/pages/onboarding/pages/SkillsPage.tsx | 2 + .../pages/onboarding/pages/WelcomePage.tsx | 16 +- app/src/services/__tests__/analytics.test.ts | 190 +++++++++++++++++- app/src/services/analytics.ts | 146 +++++++++++++- app/src/services/webviewAccountService.ts | 12 ++ app/src/utils/config.ts | 3 + pnpm-lock.yaml | 8 + src/openhuman/about_app/catalog.rs | 5 +- 21 files changed, 426 insertions(+), 16 deletions(-) diff --git a/.claude/memory.md b/.claude/memory.md index d9a6553a4..ffb0ce36b 100644 --- a/.claude/memory.md +++ b/.claude/memory.md @@ -155,6 +155,14 @@ Quick reference for anyone starting with Claude on this project. Updated by the - **FrameProvider loops — sleep animation resets** — `FrameProvider` uses `frame % durationInFrames` so animations loop. Default `DURATION_FRAMES = FPS * 6` (6s). Sleep animation completes at 4s, then eyes re-open at 6s when frame resets to 0. Fix: use a much longer `durationInFrames` for sleep face (e.g. `FPS * 600`) so the loop never triggers while sleeping. - **Hover detection needs circular hitbox** — The mascot panel is 79x79 but the character is visually circular. Using the full AABB (`cursor_in_panel`) for hover triggers false positives when cursor is in a panel corner. Use distance-from-center check instead. Also suppress hover events for ~1s after panel shows to let the webview load. +## Google Analytics (Issue #1479) + +- **`react-ga4` injects a `