Automated
AI-assisted
Use Cursor, Claude Code, or another AI to help you integrate the Flutter SDK.
Repository
Here, you will find the pub.dev appstack_plugin documentation. Please use the latest available version of the SDK. Current stable release: 2.10.1, published 22 September 2026. See the changelog for everything that changed.Quickstart
Use this path when you only need the minimum production integration:- Add
appstack_pluginfrom pub.dev. - Run
flutter pub getandcd ios && pod installfor iOS projects. - Copy the Production API key from SDK in Appstack.
- Call
AppstackPlugin.configure(...)frommain()beforerunApp. - Send standard events such as
EventType.login,EventType.signUp,EventType.purchase, andEventType.subscribe. - Confirm events appear in the Appstack SDK page before enabling downstream integrations.
Watch the video walkthrough
Watch the video walkthrough
Claude
Claude
Codex
Codex
AI agent
AI agent
Manual
Manual
Requirements
iOS
- iOS version: 13.0+ (15.0+ required for Apple Ads attribution).
- Xcode: 14.0+
Android
- Minimum SDK: Android 5.0 (API level 21).
- Target SDK: 35+
General
- Flutter: 3.3.0+
- Dart: 2.18.0+
Initial setup
1
Installation
From your project root:Or add Note: The iOS AppstackSDK.xcframework is bundled with the plugin; no additional dependencies are needed.Android ConfigurationAdd the repository to your No additional Android configuration is needed after adding the repository. You still need to initialize the plugin before using SDK methods.
appstack_plugin under dependencies in pubspec.yaml using the current version from pub.dev, then run flutter pub get.iOS ConfigurationRun pod install:android/build.gradle:2
Initialization
Follow these steps to get the API key:
- In Appstack, from the side menu, select SDK and ensure you are selecting the correct application.
- Select the Production environment.
- Copy the API key.
3
Configuration parameters
Initializes the SDK with your API key. Call this from
main() before runApp. configure also takes optional logLevel and customerUserId named parameters; see the Flutter API reference for the full signature and options.logLevel accepts only 0 DEBUG, 1 INFO, 2 WARN, or 3 ERROR (default 1); an out-of-range value throws.4
Customer user ID
The customer user ID is your own identifier for the signed-in user. Appstack attaches it to events so server-to-server events — which identify the user by this ID rather than by the install — can be joined back to the install that produced them.Set it as soon as it is known — at
configure time via the customerUserId parameter, or later, most often once a login reveals it. It applies to every event sent from then on, including ones the native SDK has buffered but not yet flushed, and at least one event has to follow for it to take effect. See setCustomerUserId() in the API reference for the full semantics.5
Sending events
Track user actions and revenue in your app:
EventType.install is tracked automatically on SDK initialization. Do not send it manually. See the Flutter API reference for the full signature, parameter details, and the complete list of EventType values.Enhanced app campaignsFor any event that represents revenue, send revenue or price (number) and currency (string, e.g. EUR, USD). To improve matching quality on Meta, also send these when you can:email.name(first + last name in the same field).phone_number— also accepted asphoneorphoneNumber.date_of_birth(recommended format:YYYY-MM-DD) — also accepted asbirthdate,birthday, ordateOfBirth.gender.
Appstack ID and attribution params
Afterconfigure, you can read the Appstack user ID and the attribution map for partner integrations (for example Superwall, RevenueCat).
getAttributionParams() waits for the attribution match to finish, so you do not need a fixed delay after launch. For the full signatures and return values, see the Flutter API reference.
A matched install returns something like:
appstack_adnetwork is google, meta or tiktok. It is absent when the click carried no recognised network param — for a standard link, read media_source instead. On Google the campaign, ad set and ad values are numeric IDs rather than names. appstack_id comes back on every result, including organic ones, so read appstack_match_status rather than testing whether the map is empty.
For the meaning of each appstack_match_status value and how to read it, see the Flutter API reference.
Check for the key rather than assuming it is there — Android does not report it yet.
Development setup
Environment-based configuration
Set up different API keys for different environments:Platform-specific considerations
iOS
Apple Ads attribution:- Only works on iOS 15.0+ (below that the call is a no-op)
- Requires app installation from App Store or TestFlight.
- Attribution is matched within seconds of the app opening.
- User consent may be required for detailed attribution (iOS 14.5+).
Android
Play Store Attribution- Install referrer data collected automatically.
- Attribution available immediately for Play Store installs.
- Works with Android 5.0+ (API level 21).
Cross-platform best practices
Security and privacy
- Never commit API keys to version control.
- Use separate production and development keys.
- Do not put personally identifiable information in event names.
- Only send matching parameters such as
email,name,phone_number, anddate_of_birthwhen your app has the right consent and compliance basis. Appstack automatically encrypts these fields before using them for attribution matching. - Prefer standard event types for common flows so event mapping remains consistent across Appstack and ad integrations.
Limitations
Attribution timing
- iOS: Apple Ads attribution is matched within seconds of the app opening after install.
- Android: Install referrer data available immediately for Play Store installs.
- Attribution only available for apps installed from official stores.
Platform constraints
- iOS: Requires iOS 13.0+; Apple Ads attribution requires iOS 15.0+.
- Android: Minimum API level 21 (Android 5.0).
- Flutter: 3.3.0+
- Some Apple Ads features may not work in development/simulator environments.
Event tracking
- Event names are case-sensitive and standardized.
- For revenue events, always pass a
revenue(orprice) and acurrencyparameter. - The SDK must be initialized from
main()beforerunAppand before any tracking calls. enableAppleAdsAttribution()only works on iOS and returns false on Android.- Network connectivity required for event transmission (events are queued offline).
Troubleshooting
Configuration fails
- Confirm the API key was copied from the correct app and environment in Appstack.
- Confirm
AppstackPlugin.configure(...)runs frommain()afterWidgetsFlutterBinding.ensureInitialized()and beforerunApp. - Confirm
flutter pub gethas completed successfully. - For iOS, confirm
cd ios && pod installhas completed successfully.
Events do not appear
- Confirm
configure(...)completes before the firstsendEvent(...)call. - Confirm the device has network connectivity.
- Check that revenue events include a numeric
revenueorpricevalue and a validcurrency. - Allow a few minutes for events to appear in the dashboard.
iOS attribution does not appear
- Confirm the app was installed from the App Store or TestFlight.
- Confirm the device runs iOS 15.0+.
- Call
AppstackPlugin.enableAppleAdsAttribution()only on iOS after initialization. - Attribution is matched within seconds of the app opening.
Android attribution does not appear
- Confirm the app was installed from the Play Store.
- Confirm Android min SDK is 21+ and target SDK is 35+.
- Confirm the required repositories are available in your Android Gradle configuration.
Apple Ads
To start using the Apple Ads integration, click here to see the correct SDK documentation.Verification checklist
appstack_pluginis installed from pub.dev.flutter pub gethas completed successfully.- iOS dependencies are installed with
cd ios && pod install. - App meets Flutter 3.3.0+, Dart 2.18.0+, iOS 13.0+, Android min SDK 21, and target SDK 35+ requirements.
- Platform-specific API keys are configured for iOS and Android.
- Production API keys are used in production builds.
- Development API keys are used only in development builds.
configure(...)runs once frommain()beforerunApp.- The customer user ID is set — via
configure(...)orsetCustomerUserId(...)— as soon as it is known, and at least one event follows it. - iOS-only Apple Ads calls are guarded with
Platform.isIOS. EventType.installis not sent manually.- Login, signup, purchase, subscription, and other key app events use standard event types where possible.
- Revenue events include
revenueorpriceandcurrency. - Custom events use
EventType.customwith a descriptiveeventName. - Appstack ID and attribution params are available before wiring partner integrations.
- Events are visible in the Appstack SDK page before launch.
Support
For questions or issues:- Check the GitHub Repository.
- Contact our support team at support@appstack.tech
- Open an issue in the repository.
Use Cursor, Claude Code, or another AI to validate your existing Appstack Flutter plugin integration.

