Flutter Product Analytics installation
Install with the wizard
Run this command in your project directory to add PostHog to your Flutter project. The wizard detects your framework, installs the SDK, and sets up your first events.
Or set it up manually by following the rest of this guide.
CocoaPods is becoming read-only. CocoaPods trunk becomes read-only on December 2, 2026, and
posthog-ios4.0 and later is only published through Swift Package Manager (SPM).
posthog_flutter6.0 and later usesposthog-ios4.0 and installs on iOS and macOS through SPM only. It has no podspec. It needs Xcode 26 or later, iOS 15, and macOS 11. Flutter 3.44 and later turn SPM on by default. See the Flutter migration guide.
posthog_flutter5.x stays onposthog-ios3.x through CocoaPods or SPM. If your app can't use SPM, stay on 5.x. That includes a Flutter module embedded in an iOS app on Flutter earlier than 3.50, which installs module plugins with CocoaPods.
posthog_flutter6.0 also needs Flutter 3.41 or later on every platform, including Android and web.flutter pub getfails on an older Flutter.
- 1
Install the package
RequiredAdd the PostHog Flutter SDK to your
pubspec.yaml:pubspec.yaml - 2
Platform 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.gradleAdd these values to your
Info.plist:ios/Runner/Info.plistUpdate the minimum platform version to iOS 13.0 in your
Podfile:PodfileAdd these values in
index.html:web/index.html - 3
Send events
RecommendedOnce installed, PostHog will automatically start capturing events. You can also manually send events to test your integration:
Dart - 4
Next steps
RecommendedNow that you're capturing events, continue with the resources below to learn what else Product Analytics enables within the PostHog platform.
Resource Description Capturing events Learn how to capture custom events beyond autocapture Identifying users Associate events with specific users Creating insights Build trends, funnels, and retention charts Group analytics Track events at the company or account level





