feat: add PostHog analytics with full event tracking across app
Integrate self-hosted PostHog (SPM) with AnalyticsManager singleton wrapping all SDK calls. Adds ~40 type-safe events covering trip planning, schedule, progress, IAP, settings, polls, export, and share flows. Includes session replay, autocapture, network telemetry, privacy opt-out toggle in Settings, and super properties (app version, device, pro status, selected sports). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -477,6 +477,9 @@ struct OnboardingPaywallView: View {
|
||||
.padding(.bottom, Theme.Spacing.xl)
|
||||
}
|
||||
.background(Theme.backgroundGradient(colorScheme))
|
||||
.onAppear {
|
||||
AnalyticsManager.shared.track(.onboardingPaywallViewed)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Feature Page
|
||||
@@ -556,7 +559,7 @@ struct OnboardingPaywallView: View {
|
||||
// MARK: - Pricing Page
|
||||
|
||||
private var pricingPage: some View {
|
||||
PaywallView()
|
||||
PaywallView(source: "onboarding")
|
||||
.storeButton(.hidden, for: .cancellation)
|
||||
}
|
||||
|
||||
@@ -584,6 +587,7 @@ struct OnboardingPaywallView: View {
|
||||
// Continue free (always visible)
|
||||
Button {
|
||||
markOnboardingSeen()
|
||||
AnalyticsManager.shared.track(.onboardingPaywallDismissed)
|
||||
isPresented = false
|
||||
} label: {
|
||||
Text("Continue with Free")
|
||||
|
||||
Reference in New Issue
Block a user