Appsflyer Push API can help advertisers stream raw data about their Installs and events to your Swaarm servers for analytics and attribution purposes. You can find more details about the Appsflyer Push API here.
NOTE: Push API needs to be set individually for each app in your Appsflyer account
Step 1: In Appsflyer, go to Export -> API Access
Step 2: Set up the Endpoint configuration in Appsflyer
Select the http method as post and add in your swaarm server url. This url will be different for Android and iOS apps
For Android:
https://track.yourdomainname.swaarm-clients.com/appsflyer-push-android
For iOS:
https://track.yourdomainname.swaarm-clients.com/appsflyer-push-ios
Next, select the Events you would like to get the raw data for
Select all the message fields
Select send all in-app events
Save
Step 3: Setting up Swaarm Offer links
If you would like to map the raw data to the partner data in Swaarm, then make sure to add the following params and macros to your appsflyer tracking links (in addition to your standard appsflyer tracking link) while creating the respective offers in Swaarm
af_sub1={id}&af_sub2={pea.chain}
Your complete Appsflyer tracking link should look like the following
https://app.appsflyer.com/APPID?pid=YOUR_PID&af_enc_data={offer.weGet}&af_ip={user.ip}&af_lang={user.language}&af_ua={user.encoded_ua}&af_siteid={publisher.id}&af_sub_siteid={publisher.subId}&c={offer.name}&af_c_id={offerId}&af_ad={publisher.creative}&af_adset={pea.chain}&clickid={id}&advertising_id={device.ids.gaid}&idfa={device.ids.idfa}&af_sub1={id}&af_sub2={pea.chain}