Files
Reflect/Shared/EventLogger.swift
Trey t a08d0d33c0 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>
2026-02-10 13:57:30 -06:00

23 lines
436 B
Swift

//
// EventLogger.swift
// Feels
//
// Created by Trey Tartt on 3/10/22.
//
import Foundation
#if canImport(PostHog)
import PostHog
#endif
class EventLogger {
static func log(event: String, withData data: [String: Any]? = nil) {
#if DEBUG
print("[EventLogger] \(event)", data ?? "")
#endif
#if canImport(PostHog)
PostHogSDK.shared.capture(event, properties: data)
#endif
}
}