Files
Jiang Bohan d9bf076eac feat(analytics): migrate from Mixpanel to PostHog
Replace mixpanel-browser with posthog-js for frontend analytics.
PostHog provides CLI + SQL query support (HogQL) which enables
agents to query analytics data directly.

Key changes:
- Replace mixpanel-browser dep with posthog-js
- Rewrite analytics module: mixpanel.ts → posthog.ts
  - mixpanel.track() → posthog.capture()
  - mixpanel.identify() → posthog.identify()
  - mixpanel.register() → posthog.register()
  - mixpanel.reset() → posthog.reset()
- Remove incrementUserProperty (PostHog counts events natively via HogQL)
- Env vars: NEXT_PUBLIC_MIXPANEL_TOKEN → NEXT_PUBLIC_POSTHOG_KEY + NEXT_PUBLIC_POSTHOG_HOST
- All existing tracking points preserved, same event names and properties
2026-04-09 16:18:42 +08:00
..