AppsFlyer

AIRSHIP MAINTAINED INTEGRATION

This integration is maintained by Airship. Please contact Airship for support.

Empower marketers with a suite of comprehensive measurement and analytics solutions.

AppsFlyer is a popular mobile attribution platform. With the bi-directional integration between Airship and AppsFlyer, you can import attribution data from AppsFlyer to segment and personalize messages as well as send events back to AppsFlyer via Airship Real-Time Data StreamingA service that delivers engagement events in real time via the Data Streaming API or an Airship partner integration. (RTDS).

Airship ingests media source, campaign, campaign ID, attributed Ad ID, or attributed adgroup AppsFlyer parameters as Airship attributes and then sends RTDS events back to AppsFlyer. This enables AppsFlyer to analyze Airship-driven message response.

 Note

Only Airship Send and the Open events are supported.

AppsFlyer Dashboard: Receive Data from Airship

To enable receiving data from Airship, open the AppsFlyer dashboard for your app, then:

  1. In the main menu, select Integrated Partners under Configuration.
  2. In the search field, enter Airship RTDS.
  3. Click the found Airship RTDS partner integration to see all its settings.
  4. On the Integration tab, select Activate partner.
  5. On the Attribution link tab, set up the attributes link parameters.

AppsFlyer Dashboard: Send Data to Airship

On the AppsFlyer dashboard, use the Airship partner integration to enable sending AppsFlyer data to the Airship SDK. In code, you need to associate the Airship channel ID with the AppsFlyer SDK.

  1. Sign in and open the AppsFlyer dashboard for your app.
  2. In the main menu, select Integrated Partners under Configuration.
  3. In the search field, enter Airship.
  4. Click the found Airship partner integration to see all its settings.
  5. On the Integration tab, enter the channelID of your app in the AppKey field.

Airship Integration Setup

On the Airship dashboard, open the project for your app, then:

  1. Go to Settings » Real-Time Data Streaming.

  2. Under Real-Time Data Streaming, click AppsFlyer.

     Tip

    Previously configured integrations are listed under Enabled Integrations.

  3. Configure a new AppsFlyer integration:

    • Enter a user-friendly name and description.
    • (Optional) Enter your AppsFlyer Dev key. You can find this key on the AppsFlyer dashboard for your app: under Configuration, open App settings and check the value of the Dev key field under SDK authentication
    • Select the Event Types that you want to send to AppsFlyer: Opens and/or Sends.
  4. Click Activate.

Setting Attributes for Integration

You need to register the supported AppsFlyer parameters as attributes on the Airship dashboard of your app. Note that the names of the Airship attributes are different from the names corresponding AppsFlyer parameters. The data type of all attributes is Text.

When defining attributes on the Airship dashboard, use the value of the AppsFlyer Parameter Name from the following table for the Attribute ID field. The Description column becomes the name of your attribute.

AppsFlyer Parameter NameDescription
appsflyer_pidMedia Source
appsflyer_campaignCampaign
appsflyer_campaign_idCampaign ID
appsflyer_adsetAttributed Adgroup
appsflyer_ad_idAttributed Ad ID

See the Attributes page for more information about how to work with attributes.

Android Example

Bi-directional integration with AppsFlyer
import ...
// AppsFlyer Imports
import android.util.Log;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerConversionListener;

public class SampleApplication extends Application {
    private static final String AF_DEV_KEY = "YOUR_DEV_KEY_FROM_APP_SETTINGS";
    @Override
    public void onCreate() {
        super.onCreate();
		...
        AppsFlyerLib.getInstance().init(AF_DEV_KEY, conversionListener, this);
        AppsFlyerLib.getInstance().start(this);
		...
		// Associating the channelID with AppsFlyerLib
        HashMap<String, Object> customData = new HashMap<String,Object>();
        String channelId = UAirship.shared().getChannel().getId();
        customData.put("android_channel", channelId);
        AppsFlyerLib.getInstance().setAdditionalData(customData);
    }
}

Refer to AppsFlyer documentation for details about how to use the AppsFlyer SDK.