iOS product analytics installation
- 1
Install via CocoaPods
RequiredAdd PostHog to your Podfile:
PodfileOr install via Swift Package Manager:
Package.swift - 2
Configure PostHog
RequiredInitialize PostHog in your AppDelegate:
AppDelegate.swift - 3
Send events
Capture custom events using the PostHog SDK:
SwiftBy default, for backwards compatibility reasons, events are sent with person profile processing enabled. This means a person profile will be created for each user who triggers an event.
If you want to disable person profile processing for certain events, send the event with the following property:
Swift