Amplitude's AppsFlyer streaming integration forwards your Amplitude events straight to [AppsFlyer](https://www.appsflyer.com/) with a few clicks.

## Prerequisites

To configure streaming from Amplitude to AppsFlyer, you need the following information from AppsFlyer.

- **AppsFlyer S2S Key**: The AppsFlyer S2S Key used for authentication. Refer to the [AppsFlyer documentation](https://support.appsflyer.com/hc/en-us/articles/360004562377-Managing-API-and-Server-to-server-S2S-tokens) for help locating your S2S Key.
- **AppsFlyer App ID**: The AppsFlyer identifier for your app. It's located in AppsFlyer App Settings and can also be retrieved from the URL in your AppsFlyer Dashboards.

## Set up the integration

### Create a new sync

1. In Amplitude Data, click **Catalog** and select the **Destinations** tab.
2. In the Event Streaming section, click **AppsFlyer**.
3. Enter a sync name, then click **Create Sync**.

### Enter credentials

1. Select your **AppsFlyer S2S Key**.
2. Enter your **AppsFlyer App ID**.

### Configure event forwarding

Under **Send Events**, make sure the toggle is enabled ("Events are sent to AppsFlyer") if you want to stream events to AppsFlyer. When enabled, Amplitude automatically forwards events to AppsFlyer when Amplitude ingests them. Events aren't sent on a schedule or on-demand using this integration.

1. In **Select and filter events** choose which events to send. Choose only the events you need in AppsFlyer.

{% callout type="warning" title="Events for non-AppsFlyer users cannot be streamed" %}
AppsFlyer requires that all events have an **AppsFlyer ID** present. If you have selected any events to send to AppsFlyer that may not have an **AppsFlyer ID**, add a filter to send only events where the **AppsFlyer ID** is present. Otherwise, your delivery metrics may be affected.
{% /callout %}


2. In **Map properties to destination**:
    1. Select an Amplitude user property that corresponds to your [**AppsFlyer ID**](https://support.appsflyer.com/hc/en-us/articles/4408847686161-Device-identifiers#appsflyer-id), from the left dropdown.
    2. (recommended) Map an Amplitude user property to [AppsFlyer **Customer User ID**](https://support.appsflyer.com/hc/en-us/articles/4408847686161-Device-identifiers#customer-user-id).
        1. Select an Amplitude user property that corresponds to your AppsFlyer **Customer User ID**, from the left dropdown.
        2. Select **Customer User ID**, from the corresponding right dropdown.
    3. (recommended) Map Amplitude user properties to AppsFlyer device identifiers. Amplitude recommends that you map Amplitude properties to as many of AppsFlyer [GAID, Amazon Advertising ID, OAID, and IMEI](https://support.appsflyer.com/hc/en-us/articles/4408847686161-Device-identifiers#android-device-identifiers) (for Android) or [IDFA and IDFV](https://support.appsflyer.com/hc/en-us/articles/4408847686161-Device-identifiers#apple-device-identifiers) (for Apple) as possible.
        1. Select an Amplitude user property that corresponds to an AppsFlyer device identifier, from the left dropdown.
        2. Select the AppsFlyer device identifier, from the corresponding right dropdown.
    4. (optional) Map other Amplitude user properties to AppsFlyer properties.
        1. Select an Amplitude user property that corresponds to an AppsFlyer property, from the left dropdown.
        2. Select the AppsFlyer property, from the corresponding right dropdown.

    Refer to the full list of [AppsFlyer properties that are supported by Amplitude](#supported-appsflyer-properties).

3. (optional) In **Select additional properties**, select any more event and user properties you want to send to AppsFlyer. If you don't select any properties here, Amplitude doesn't send any. Amplitude sends these properties to AppsFlyer as [AppsFlyer event values](https://dev.appsflyer.com/hc/reference/post_s2s_inappevent).

### Enable sync

When satisfied with your configuration, at the top of the page toggle the **Status** to "Enabled" and click **Save**.

## Supported AppsFlyer properties

| Parameter Name        | Required | Recommended |
| --------------------- | :------: | :---------: |
| **AppsFlyer ID**      |    ✅     |             |
| Customer User ID      |          |      ✅      |
| Advertising ID (GAID) |          |      ✅      |
| Amazon AID            |          |      ✅      |
| OAID                  |          |      ✅      |
| IMEI                  |          |      ✅      |
| IDFA                  |          |      ✅      |
| IDFV                  |          |      ✅      |
| AF Content ID         |          |             |
| AF Content Type       |          |             |
| AF Currency           |          |             |
| AF Revenue            |          |             |
| Event Currency        |          |             |
| iOS ATTrackingManager |          |             |
| IP Address            |          |             |
