Skip to main content

AppsFlyer Integration with Swaarm

How to set up the attribution link and postback URLs for AppsFlyer integration with Swaarm.

Overview

This article covers the attribution link template and postback URL setup for integrating AppsFlyer with Swaarm. The templates below are suggested starting points - you can add or remove parameters based on your requirements. Once ready, you can either configure the templates yourself in the AppsFlyer partner dashboard, or share them with the AppsFlyer team who will make the necessary changes. Note that some parameters are pulled from the user's click, while others come from the SDK - confirm with AppsFlyer which data collection method applies to your setup.

ℹ️


Attribution Link

The base AppsFlyer attribution link structure is:

https://app.appsflyer.com/{app_id}?pid={media_source}&c={campaign_name}
  • {app_id} - the app's App Store/Itunes ID or Google Play package name

  • pid - your AppsFlyer Partner ID (e.g. yournetwork_int)

  • c - campaign name - use the offer name macro {offer.name} or set it manually

Complete attribution link with Swaarm macros

ℹ️ The templates below are suggested starting points - you're free to add or remove parameters and macros based on your company's specific needs.

https://app.appsflyer.com/com.testapp?pid={yournetwork_int}&af_enc_data={offer.appsflyer_revenue}&af_ip={user.ip}&af_lang={user.language}&af_ua={user.encoded_ua}&af_model={user.model}&af_os_version={user.os_version}&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}

⚠️ Replace {yournetwork_int} with your own AppsFlyer Partner ID.

Or you can also use the capture below as a template to set the Attribution link on the AppsFlyer platform.


Postback URLs

Install Postback

https://track.{yournetwork}.swaarm-clients.com/postback?publisher_id={Site ID}&rejection_reason={Blocked reason}&rejected_reason_value={Blocked reason value}&country={Country code}&os_name={Platform}&publisher_sub_id={Sub site ID}&click_id={Click ID}

In-App Event Postback

https://track.{yournetwork}.swaarm-clients.com/postback?publisher_id={Site ID}&rejection_reason={Blocked reason}&rejected_reason_value={Blocked reason value}&country={Country code}&os_name={Platform}&publisher_sub_id={Sub site ID}&click_id={Click ID}&event_id={Event name}&sale_amount={Event revenue USD}

⚠️ Replace yournetwork with your own Swaarm postback domain.

Alternatively, you can also use the capture below as a template to set the Default postback on the AppsFlyer platform:


In-App Event Setup in Swaarm

For Swaarm to track in-app events from AppsFlyer, you need to map the AppsFlyer event name to the offer's event type:

  1. Go to the offer → Edit → Events

  2. On each event, set the Adv. EventType ID to match the AppsFlyer event name exactly (case-sensitive)

⚠️ Adv. EventType ID must be an exact match with the AppsFlyer event value - otherwise the event will not be attributed correctly.


Advanced Privacy Integration

For iOS 14.5+ campaigns where click ID attribution is not available, Swaarm supports privacy postbacks using the PEA chain. → AppsFlyer Advanced Privacy Integration

Did this answer your question?