Replace EventLogger with typed AnalyticsManager using PostHog

Complete analytics overhaul: delete EventLogger.swift, create Analytics.swift
with typed event enum (~45 events), screen tracking, super properties
(theme, icon pack, voting layout, etc.), session replay with kill switch,
autocapture, and network telemetry. Replace all 99 call sites across 38 files
with compiler-enforced typed events in object_action naming convention.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-10 15:12:33 -06:00
parent a08d0d33c0
commit e0330dbc8d
38 changed files with 1048 additions and 202 deletions

View File

@@ -79,11 +79,11 @@ class HealthService: ObservableObject {
try await healthStore.requestAuthorization(toShare: [], read: readTypes)
isAuthorized = true
isEnabled = true
EventLogger.log(event: "healthkit_authorized")
AnalyticsManager.shared.track(.healthKitAuthorized)
return true
} catch {
print("HealthService: Authorization failed: \(error.localizedDescription)")
EventLogger.log(event: "healthkit_auth_failed", withData: ["error": error.localizedDescription])
AnalyticsManager.shared.track(.healthKitAuthFailed(error: error.localizedDescription))
return false
}
}