Leanplum's user guides and developer documentation.

Appsflyer integration

You can integrate with Appsflyer by sending Leanplum a postback containing publisher information. This allows you to view attribution data in Leanplum analytics as well as use it for targeting in A/B tests or marketing campaigns, via Leanplum’s targeting and segmentation menu.

Before you activate the integration with Appsflyer, you first need to confirm that your Leanplum integration is using the same Device ID as Appsflyer. This is how Leanplum matches the user install in Leanplum with the postback data from Appsflyer, so if the Device IDs don't match, Leanplum cannot report the data.

By default, Leanplum collects the IDFV for iOS and the MD5 hash of the MAC address for Android, but this can be easily changed to IDFA for iOS and GAID for Android with one line of code. For information about how to change the Device ID format, see: Device IDs.

Appsflyer only supports IDFA for postbacks to Leanplum, so you will need to update the default Leanplum IDFV to IDFA (see code below) within your AppDelegate file.
Leanplum.setDeviceId(ASIdentifierManager.shared().advertisingIdentifier.uuidString)

Set up the integration

  1. In the Leanplum dashboard, click your name at the top right of the screen and select App Settings from the dropdown.
  1. Click Keys & Settings for a selected app.
  1. In the popup window, you'll see your App ID and Production key. Copy these for later.
  1. Now go to Configure Leanplum in AppsFlyer’s Dashboard.

  2. Click Integrated Partners in the left of the screen and search for Leanplum.

  1. Click the Leanplum logo to open the configuration window.
  1. Under Integration Parameters, click the Enable check box.

  2. Insert the App ID and Production key you copied from Leanplum console (see step 3).

  3. Click Save & Close.

Once you have saved the configuration, AppsFlyer sends the following data to Leanplum for every organic and non-organic install:

  • Device ID (IDFA / Google Advertising ID)
  • Media Source
  • Campaign name

Twitter and Facebook installs sent as organic

According to Facebook and Twitter T&C, Appsflyer is unable to share user level data with any third party. As a result, all Facebook and Twitter installs are sent to Leanplum as organic.

Viewing User Attribution Data in Leanplum

Once you have set up the integration between Leanplum and Appsflyer, you can access the information by utilizing Leanplum’s targeting and segmentation menu:

This menu is available in the Analytics, Messages, A/B Tests, and Users sections of the Leanplum platform.

You can filter by, group by, and cohort by this data in Analytics, filter by this data in the Users section, and target by this data in Analytics and A/B Tests.

Appsflyer integration


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.