feat: add PostHog product analytics for key user actions (#110)

Tracks 9 key events: account_created, login_success, flow_viewed,
session_started, session_completed, export_generated, ai_feature_used,
psa_connected, session_shared. Identifies users on login, resets on
logout. Autocapture disabled — only explicit discrete events.

Set VITE_POSTHOG_KEY in environment to enable.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit was merged in pull request #110.
This commit is contained in:
chihlasm
2026-03-16 18:24:31 -04:00
committed by GitHub
parent 8534dbfb5f
commit 1e8ed09fbd
7 changed files with 550 additions and 7 deletions

View File

@@ -1,4 +1,7 @@
import "./instrument"; // Sentry must init before any other imports
import { initAnalytics } from './lib/analytics'
initAnalytics() // PostHog product analytics
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'