AppsFlyer is a mobile marketing analytics and attribution platform that helps you analyze and optimize your apps through marketing analytics, mobile attribution, and deep linking.

Build more holistic marketing campaigns by leveraging mobile install attribution data from AppsFlyer. With AppsFlyer and Braze, you can pass install attribution data to Braze to better understand how to optimize your campaigns.


Step 1: Integration Requirements

  • This integration supports iOS and Android apps.
  • Your app will need Braze’s SDK and AppsFlyer’s SDK installed.

If you have an Android app, you will need to include the code snippet below, which passes a unique Braze device id to AppsFlyer. For most setups, this code should be included alongside all calls to AppsFlyerLib.Instance.StartTracking, typically in an activity’s onCreate callback.

HashMap<String, Object> customData = new HashMap<String,Object>();
String deviceId = Braze.getInstance(context).getInstallTrackingId();
customData.put("customData", deviceId);

If you have an iOS app, your IDFV will be collected by AppsFlyer and sent to Braze. This ID will then be mapped to a unique device ID in Braze.

Braze will still store IDFA values for users that have opted-in if you are collecting the IDFA with Braze, as described in our iOS 14 Upgrade Guide. Otherwise, the IDFV will be used as a fallback identifier to map users.

Dictionary<string, string> customData = new Dictionary<string, string>();
customData.Add("brazeCustomerId", Appboy.AppboyBinding.GetInstallTrackingId());

Step 2: Getting the Braze Data Import Key

In your Braze account, navigate to Attribution under Technology Partners and select AppsFlyer. Here, you will find the REST Endpoint and generate your Braze Data Import Key. Once generated, you will be able to create a new key, or invalidate an existing one. The Data Import Key and the REST Endpoint are used in the next step when setting up a postback in AppsFlyer’s dashboard.

AppsFlyer Image

Step 3: Configure Braze in AppsFlyer’s Dashboard

In AppsFlyer’s dashboard, navigate to the Integrated Partners page on the left bar. From here, search for Braze and click on Braze’s logo to open up a configuration window. AppsFlyer

Within the Integration tab, switch on Activate Partner, copy the Data Import Key into the API_key field, add your Braze REST Endpoint URL into the REST Endpoint field. There will also be an option to toggle advanced privacy, make sure that this toggle is turned off. Finally, save your configuration.

Additional information on these instructions is available in AppsFlyer’s documentation.

Once you have saved the configuration, AppsFlyer sends the following data to Braze for every organic and non-organic install. Below, you can view how Braze maps AppsFlyer’s data fields to specific segment filters.

AppsFlyer Data Field Braze Segment Filter
media_source Attributed Source
campaign Attributed Campaign
af_adset Attributed Adgroup
af_ad Attributed Ad

Step 4: Confirming the Integration

Once Braze receives attribution data from AppsFlyer, the status connection indicator on Technology Partners, then Attribution will change to green and a timestamp of the last successful request will be included. Note that this will not happen until we receive data about an attributed install. Organic installs, which should be excluded by the AppsFlyer integration, are ignored by our API and are not counted when determining if a successful connection was established.

Step 5: Viewing User Attribution Data

Your user-base can be segmented by attribution data in the Braze dashboard using the Install Attribution filters.

User Attributes 1

Additionally, attribution data for a particular user is available on each user’s profile in the Braze Dashboard.

Facebook, Snapchat, and Twitter Attribution Data

Attribution data for Facebook, Snapchat, and Twitter campaigns is not available through our partners. These media sources do not permit their partners to share attribution data with third parties and, therefore, our partners cannot send that data to Braze.

For more information, please see AppsFlyer’s documentation.

Email Deep Linking and Click Tracking

Deep links, links that direct users toward a specific page or place within an app or website, are crucial in creating a tailored user experience. While widely used, often issues come up when using them in tandem with click tracking, another vital feature used in collecting user data. These issues are due to ESPs (Email Service Providers) wrapping deep links in their own click recording domain, breaking the original link.

There are, however, ESPs like Sendgrid that support both universal linking and click tracking. Braze recommends integrating OneLink-based attribution links into your SendGrid email system in order to seamlessly deep link from emails. To get started, check out AppsFlyer’s documentation.

Click Tracking URLs in Braze (Optional)

You can use AppsFlyer’s OneLink attribution links in Braze campaigns across push, email, and more. This allows you to be able to send back install or re-engagement attribution data from their Braze campaigns into AppsFlyer. As a result, you will be able to holistically see the impact of your paid and owned channels in a single platform.

You can simply create your OneLink tracking URL in AppsFlyer and insert it into your Braze campaigns directly. AppsFlyer will then use their probabilistic attribution methodologies to attribute the user that has clicked on the link or deep link. To improve the accuracy of attributions from your Braze campaigns, we recommend appending your AppsFlyer tracking links with a device identifier. This will deterministically attribute the user that has clicked on the link.

For Android, Braze allows customers to opt-in to Google Advertising ID collection (GAID). The GAID is also collected natively through the AppsFlyer SDK integration. You can include the GAID in your AppsFlyer click tracking links by utilizing the Liquid logic below:

{% if most_recently_used_device.${platform} == 'android' %}
{% endif %}

For iOS, both Braze and AppsFlyer automatically collect the IDFV natively through our SDK integrations. This can be used as the device identifier. You can include the IDFV in your AppsFlyer click tracking links by utilizing the Liquid logic below:

{% if most_recently_used_device.${platform} == 'ios' %}
{% endif %}

This recommendation is purely optional
If you currently do not use any device identifiers - such as the IDFV or GAID - in your click tracking links, or do not plan to in the future, AppsFlyer will still be able to attribute these clicks through their probabilistic modeling.

New Stuff!