Attribution Integration

Learn how to pass attribution data to the dashboard using Adapty Android SDK. Adapty supports AppsFlyer, Adjust, Branch, and Facebook Ads

Adapty allows easy integration with the popular attribution services: AppsFlyer, Adjust, Branch, and Facebook Ads. Adapty will send subscription events to these services so you can accurately measure the performance of ad campaigns. You can also filter charts data using attribution data.


Make sure to turn off sending subscription events from devices and your server to avoid duplication. If you set up direct integration with Facebook, turn off events forwarding from AppsFlyer, Adjust, or Branch.


Make sure you've set up attribution integration in Adapty Dashboard, otherwise we won't be able to send subscription events.


Attribution data is set for every profile one time, we won't override the data once it's been saved.

To set attribution data for the profile, use .updateAttribution() method:

Adapty.updateAttribution(attribution, source, networkUserId) { error ->
    if (error == null) {
        // succesfull attribution update

Request parameters:

  • Attribution (required): a dictionary containing attribution (conversion) data.
  • Source (required): a source of attribution. The allowed values are:
    • .appsflyer
    • .adjust
    • .branch
    • .custom
  • Network user Id (optional): a string profile's identifier from the attribution service.


To set attribution from AppsFlyer, pass the attribution you receive from AppsFlyerConversionListener of AppsFlyer Android SDK. Don't forget to set networkUserId. You should also configure AppsFlyer integration in Adapty Dashboard.

val conversionListener: AppsFlyerConversionListener = object : AppsFlyerConversionListener {
    override fun onConversionDataSuccess(conversionData: Map<String, Any>) {
        // It's important to include the network user ID


To set attribution from Adjust, pass the attribution you receive from OnAttributionChangedListener of Adjust Android SDK. You should also configure Adjust integration in Adapty Dashboard.

val config = AdjustConfig(context, adjustAppToken, environment)
config.setOnAttributionChangedListener { attribution ->
    attribution?.let { attribution ->
        Adapty.updateAttribution(attribution, AttributionType.ADJUST)


To connect Branch user and Adapty user, make sure you set your customerUserId as Branch Identity Id. If you prefer to not use customerUserId in Branch, set networkUserId param in .updateAttribution() method to specify the Branch user Id. You should also configure Branch integration in Adapty Dashboard.

// login and update attribution
    .setIdentity("YOUR_USER_ID") { referringParams, error ->
        referringParams?.let { params ->
            Adapty.updateAttribution(params, AttributionType.BRANCH)

// logout


If you use another attribution system, you can pass the attribution data to Adapty. You can then segment users based on this data.
To set custom attribution, use only the keys from the example below (all keys are optional). Every value in the map should be no longer than 100 characters. status can only be organic, non-organic or unknown. Any additional keys will be omitted.

val attribution = mapOf(
    "status" to "non_organic", //the only possible values for this key: non_organic|organic|unknown
    "channel" to "Google Ads",
    "campaign" to "Christmas Sale",
    "ad_group" to "ad group",
    "ad_set" to "ad set",
    "creative" to "creative id"
Adapty.updateAttribution(attribution, AttributionType.CUSTOM)

Did this page help you?