Add PostHog analytics to replace removed Firebase
Wire PostHog iOS SDK into existing EventLogger pattern so all 60+ call sites flow to self-hosted PostHog instance with zero changes. Sets subscription person properties for segmentation on foreground. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,14 +6,17 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
// import Firebase // Firebase removed
|
||||
#if canImport(PostHog)
|
||||
import PostHog
|
||||
#endif
|
||||
|
||||
class EventLogger {
|
||||
static func log(event: String, withData data: [String: Any]? = nil) {
|
||||
// Firebase Analytics disabled
|
||||
// Analytics.logEvent(event, parameters: data)
|
||||
#if DEBUG
|
||||
print("[EventLogger] \(event)", data ?? "")
|
||||
#endif
|
||||
#if canImport(PostHog)
|
||||
PostHogSDK.shared.capture(event, properties: data)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user