Flutter product analytics installation
- 1
Install the package
RequiredAdd the PostHog Flutter SDK to your
pubspec.yaml:pubspec.yaml - 2
Android setup
RequiredAdd these values to your
AndroidManifest.xml:android/app/src/main/AndroidManifest.xmlUpdate the minimum Android SDK version to 21 in
android/app/build.gradle:android/app/build.gradle - 3
iOS/macOS setup
RequiredAdd these values to your
Info.plist:ios/Runner/Info.plistUpdate the minimum platform version to iOS 13.0 in your
Podfile:Podfile - 4
Web setup
Add these values in
index.html:web/index.html - 5
Send events
Capture custom events using the PostHog SDK:
DartBy 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:
Dart