Mobile app developers who run advertising campaigns face a common challenge: knowing which marketing channels actually drive installs. Without proper attribution, you're essentially guessing where your budget delivers value. AppsFlyer solves this by providing install attribution and analytics directly inside your Flutter application. This tutorial walks through the complete implementation, from adding dependencies to handling iOS privacy prompts.
Quick take
- AppsFlyer SDK version 6.15.2 works with Flutter 3.x
- Three packages needed: appsflyer_sdk, device_info_plus, app_tracking_transparency
- Android and iOS require different initialization approaches
- IOS apps must request ATT permission before accessing device identifiers
Why Attribution Matters for App Developers
When you pay for user acquisition, attribution tells you whether that spend translates into real installs. AppsFlyer connects your marketing campaigns to actual app opens, letting you calculate return on investment per channel. Development teams use this data to cut underperforming ad networks and double down on what works.
For Flutter developers specifically, the cross-platform nature creates a slight complication. AppsFlyer's official documentation focuses on native Android (Kotlin/Java) and iOS (Swift/Objective-C) implementations. The Flutter SDK wraps this native code, meaning you still need to handle platform-specific configuration for both operating systems.
Setting Up Dependencies
Add these three packages to your pubspec.yaml file. Each serves a distinct purpose in the integration:
- Appsflyer_sdk handles the core attribution and event tracking functionality
- Device_info_plus retrieves device identifiers across platforms
- App_tracking_transparency manages iOS 14.5+ permission dialogs
The current stable versions are appsflyer_sdk at version 6.15.2, device_info_plus at 11.3.0, and app_tracking_transparency at 2.0.6+1. Run flutter pub get after saving the file to fetch the packages.
iOS Configuration Steps
Apple enforces stricter privacy controls than Android, requiring additional setup before attribution works properly. In your iOS project, open Info.plist and add your Apple App ID. This numeric identifier comes from your Apple Developer account and connects the app to App Store Connect.
The second requirement involves App Tracking Transparency (ATT). Starting with iOS 14.5, apps must explicitly request permission before accessing the Identifier for Advertisers (IDFA). Without this permission, your attribution accuracy decreases significantly.
Your Dart code should check the current permission state before initializing AppsFlyer. If the user hasn't been prompted yet, present the system dialog explaining why tracking is requested. Only proceed with full attribution initialization after the user grants authorization.
Android Implementation
Android's requirements are simpler by comparison. Initialize the AppsFlyer SDK with your developer key, which you obtain from your AppsFlyer account dashboard. The Android implementation doesn't require additional permissions in your manifest for basic attribution.
Set showDebug to true during development to see verbose logs in your console. This helps verify the SDK connects properly before launching to production. Once you confirm everything works, switch this flag off to reduce log noise.
Testing Your Integration
Say you are running a campaign on a third-party ad network. You create a unique tracking link through AppsFlyer's dashboard and use it in your ad creative. When a user clicks the ad and installs your app, AppsFlyer receives the install event and attributes it to that specific campaign. Check your dashboard within minutes to see the attribution reflected.
Use test devices during development to verify events fire correctly without affecting your production data. The debug logs will confirm whether the SDK initializes successfully and sends test events.
What This Means for Your Team
Adding attribution tracking requires upfront investment in setup and testing. However, the payoff comes when you scale your marketing. Instead of assuming all channels perform equally, you gain concrete data showing which networks deliver users who actually engage with your app. Development teams working alongside marketing stakeholders find this particularly valuable for budget conversations.
The trade-off involves user privacy. IOS users can deny tracking, which means your attribution data becomes incomplete. Android users face fewer restrictions, but both platforms benefit from transparent communication about why tracking occurs. Frame this in your app's messaging as necessary for keeping the app free or supporting continued development.
Bottom Line
Integrating AppsFlyer into a Flutter project takes an afternoon of focused work. The process involves adding three dependencies, configuring platform-specific files, and initializing the SDK in your main app file. Once complete, your marketing team gains visibility into which campaigns drive real installs. This data directly informs budget allocation decisions and helps justify customer acquisition spending. Teams planning significant paid acquisition should prioritize this integration before launching large campaigns.
Key takeaways
- Three Flutter packages handle the full AppsFlyer integration workflow
- IOS requires ATT permission handling for accurate IDFA-based attribution
- Debug mode helps verify connectivity during development
- Attribution data enables smarter marketing budget decisions over time
Frequently asked questions
Where do I find my AppsFlyer developer key?
Log into your AppsFlyer dashboard and navigate to Settings. The developer key appears under App Settings and is required when initializing the SDK.
Can I use AppsFlyer without requesting ATT permission on iOS?
Yes, but attribution accuracy drops significantly. Users who deny tracking won't be attributed to specific campaigns, creating gaps in your data.
Does this work with Flutter web applications?
No. AppsFlyer's Flutter SDK targets mobile platforms only (Android and iOS). Web attribution requires different implementation methods.
What device identifiers does this integration access?
On iOS, the integration accesses IDFA when permitted and IDFV always. On Android, it uses the Google Advertising ID. The device_info_plus package provides additional device details for debugging.
How quickly do attributed installs appear in the dashboard?
Most events appear within minutes under normal conditions. Network latency or server issues can occasionally delay processing by several hours.