Enable AppsFlyer in your Despia app settings and turn on debug mode before testing. Turn debug mode off again before you submit to the App Store or Google Play, otherwise every install is marked as a test install and your real attribution data is not recorded.
Installation
- Bundle
- CDN
How it works
When your app is running, Despia passes data to AppsFlyer natively. To check that it is working, you register your test phone with AppsFlyer, install the app on that phone, and watch a live feed in the AppsFlyer dashboard to confirm the data comes through. Gate any test code behind the canonical user agent check so it only runs inside the app.Register your test device
AppsFlyer ignores data from unknown devices during testing to keep your real data clean, so you register your phone first. The easiest way is the free My Device ID app by AppsFlyer: open it, tap register, log in with your AppsFlyer account, and your phone is added automatically.My Device ID, iPhone
Download on the App Store
My Device ID, Android
Download on Google Play
Install your app
You do not need a Mac, Xcode, or Android Studio. Install the app the normal way for each platform.- iPhone
- Android
After you deploy in Despia, the build is uploaded to TestFlight automatically. Open TestFlight on your iPhone and install the latest build. Before installing, delete any existing version of the app so AppsFlyer registers a fresh install.
Watch installs in real time
AppsFlyer has a live feed that shows installs and events as they happen on your test phone.1
Open the Live Event Viewer
In the AppsFlyer dashboard, go to Settings > SDK Integration Tests, click Live Events, pick your app, pick your test phone, and click Continue.
2
Open the app on your phone
The install should appear on the dashboard within a few seconds.
Check that events are recorded
With the Live Event Viewer still open, trigger some actions and watch them appear. Each event shows up with its name and a status of 200 OK, which means AppsFlyer received it.Check that your user ID is sent
When a user logs in, you want AppsFlyer to know who they are so you can match events to real users. Add this after your login flow and confirm the event shows up in the Live Event Viewer with the customer user ID attached.Test deep links
Deep links resolve natively and arrive throughwindow.onAppsFlyerDeepLink, so verify them by watching the callback, not the page URL. Register the handler early and log what it receives, then open your app from a OneLink or install fresh after clicking one.
Before you go live
1
Turn off debug mode
Turn off debug mode in your Despia AppsFlyer settings. Debug mode is only for testing. If you leave it on, all installs are marked as test installs and your real attribution data is not recorded.
2
Rebuild and submit
Rebuild the app in Despia for both iOS and Android and submit the new builds. The change does not take effect until users install the new version.
3
Remove test alerts
Remove any
alert() calls you added during testing so they do not appear for real users.Resources
NPM Package
despia-native