# Integrate with AppsFlyer

impact.com can integrate with your existing AppsFlyer mobile app setup to enable tracking, reporting, and payouts for events in your mobile apps.

The integration supports a range of app events, including *Installs*, *In-App Sales*, *Leads*, *App Opens*, and *Sign-ups*, and can be customized to suit your specific use case.

{% hint style="success" %}
**Note:** This article covers the Integration with AppsFlyer for a Performance Program. Learn more about how to [Integrate with AppsFlyer for your Advocate Program](https://integrations.impact.com/impact-brand/docs/appsflyer-integration).
{% endhint %}

#### How it works

* In your AppsFlyer account, you’ll enable the impact.com module, configure its settings, then get your app’s attribution link.
* In your impact.com account, you'll add (or update) your mobile app(s)' *Download URL* with the attribution link created while integrating.
* For each in-app event you want to send to impact.com, you'll add new events (and *Event Codes*) to your mobile app(s) in impact.com.

## Enable the module

***

1. Log in to your [**AppsFlyer**](https://www.appsflyer.com/) account.
2. In the AppsFlyer dashboard, find the *Configuration* section and select **Integrated Partners**.
3. In the *App Search*, input `impact_radius` then select **Activate Partner**.

## Enable permissions

***

For efficient support and troubleshooting, make your AppsFlyer app visible to the impact.com team.

1. From the top navigation bar, select Permissions.
2. ![](/files/nF7DY0rLLPpjNDQb5LMS) **\[Toggle on] Ad Network Permissions**.

<div data-with-frame="true"><figure><img src="/files/Ulh5ungkI9nNJVOdltv4" alt="" width="563"><figcaption></figcaption></figure></div>

## Configure the module

***

Each subsection below refers to the relevant setting section of the module. To configure the module in AppsFlyer, navigate to **Configuration → Integrated Partners**, find the impact.com module and select **Edit**.

### General Settings

In the General Settings section, you’ll need to add your mobile app’s System App ID and your impact.com API credentials (Account SID & Auth Token).

{% hint style="success" %}
**Note:** The *General Settings* section configures the *Install* event — other events are configured in the *In-App Events* section.
{% endhint %}

| Field             | Description                                                                                                                                                                                                                                                    |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `password`        | Your impact.com API Auth Token. In the impact.com platform, navigate to your [API Credentials](https://help.impact.com/en/support/solutions/articles/155000004762-manage-api-access-tokens-as-a-brand#get-your-api-credentials-0-1) to find your Auth Token.   |
| `ActionTrackerId` | Your impact.com System App ID for your mobile app. In the impact.com platform, navigate to your [Mobile Apps](https://app.impact.com/secure/advertiser/tracking-settings/mobileapps/view-mobile-apps-flow.ihtml) to find your System App ID.                   |
| `user`            | Your impact.com API Account SID. In the impact.com platform, navigate to your [API Credentials](https://help.impact.com/en/support/solutions/articles/155000004762-manage-api-access-tokens-as-a-brand#get-your-api-credentials-0-1) to find your Account SID. |
|                   |                                                                                                                                                                                                                                                                |

### Default Postbacks

The Default Postbacks section allows you to configure which events are sent to impact.com. For the *Install* event, you must set the **for users from dropdown** to *All media sources, including organic* to ensure impact.com receives data for all installs (paid, non-attributed, and organic).

{% hint style="success" %}
**Note:** The option `All media sources, including organic` may not be immediately visible for the Install event. If it is not visible, please contact AppsFlyer Support and ask them to enable this setting for the impact.com partner integration.
{% endhint %}

### In-App Events Postback

If you want to send in-app events to impact.com (e.g., *Sale*, *Lead*, etc.), enable the *In-App Events Postback* option.

### In-App Event Settings

If the *In-App Events Postback* option is enabled, make sure to fill out this section; otherwise, leave this blank.

Your credentials here are identical to the ones used in the *General Settings* section — simply duplicate the values used for `user`, `password`, and `AppId` (identical to `ActionTrackerId`).

#### In-App Postback Window

Refer to [**In-app event postback window**](https://support.appsflyer.com/hc/en-us/articles/208439256-In-app-events-postback-configuration#inapp-event-postback-window) on AppsFlyer's Help Center for documentation on this feature.

#### Parameters

| Parameter                | Description                                                                                                                                                                                                                                                                                        |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SDK event name           | The SDK Name is the name of the parameter you’re using in the AppsFlyer SDK to track a data point.                                                                                                                                                                                                 |
| Partner event identifier | This is the identifier that impact.com will look for — must be configured as an Event Code for your mobile app. For example, if you want to track an in-app order with an SDK event name of af\_purchase, then af\_purchase must be configured as an Event Code for your mobile app in impact.com. |
| Sending option           | Determine where this data point will be sent. Select `All media sources, including organic` for all configured In-App events to ensure impact.com receives all event data (paid, non-attributed, and organic).                                                                                     |
| Send Revenue             | If the SDK is set to send a specific parameter- toggle on Send Values and Revenue (if revenue is available) or Send Values and No Revenue (if no revenue is available).                                                                                                                            |

#### Fixed structure parameter mapping

AppsFlyer sends conversion postbacks to impact.com with a fixed structure. While it’s not possible to update the fixed structure, it is possible to update the mapping for custom event data (`event-values`). Refer to [custom parameters](https://integrations.impact.com/impact-brand/?isFramePreview=true#custom-parameter-mapping) for more information.

<details>

<summary>Fixed structure parameters</summary>

| AppsFlyer Parameter                                     | impact.com Parameter |
| ------------------------------------------------------- | -------------------- |
| `APPSFLYER`                                             | `IntegrationSource`  |
| `(appsflyer-device-id)(idfa)(vendorId)(timestamp)`      | `OrderId`            |
| `(device-model)`                                        | `DeviceModel`        |
| `(ip)`                                                  | `IpAddress`          |
| `(ip)`                                                  | `IpAddressCarrier`   |
| `(appsflyer-device-id)`                                 | `appsflyer_id`       |
| `(os-version)`                                          | `DeviceOs`           |
| `(carrier)`                                             | `DeviceCarrier`      |
| `(ip)`                                                  | `IpAddressWifi`      |
| `(event-value)`                                         | `appsflyer-custom`   |
| `(AppId)`                                               | `ActionTrackerId`    |
| `(mapped-iae) \| INSTALL`                               | `EventCode`          |
| `(app-version-name)`                                    | `AppVer`             |
| `NOW`                                                   | `EventDate`          |
| `(custom-user-id)`                                      | `CustomerId`         |
| `(city)`                                                | `CustomerCity`       |
| `(country-code)`                                        | `CustomerCountry`    |
| `(app-id)`                                              | `AppPackage`         |
| `(idfa)`                                                | `AppleIfa`           |
| `(advertiserId)`                                        | `GoogAId`            |
| `(clickid)`                                             | `ClickID`            |
| `re-attribution \| empty`                               | `Text1`              |
| `(country-code) - Install only`                         | `Text2`              |
| `re-engagement \| empty`                                | `Text3`              |
| `(af_siteid) - if impression attribution via appsflyer` | `MPID`               |

</details>

#### Custom parameter mapping

Event-specific data (`event-values`) are sent by AppsFlyer as a JSON body and have the following default mapping if impact.com receives one of the AppsFlyer parameters for a conversion:

<details>

<summary>Custom <code>event-value</code> parameters</summary>

| AppsFlyer Parameter | impact.com Parameter | Type    |
| ------------------- | -------------------- | ------- |
| `af_order_id`       | `OrderId`            | String  |
| `af_content_id`     | `ItemSku`            | String  |
| `af_content_type`   | `ItemCategory`       | String  |
| `af_quantity`       | `ItemQuantity`       | int     |
| `af_price`          | `ItemPrice`          | decimal |
| `af_revenue`        | `Amount`/`Revenue`   | decimal |
| `af_currency`       | `Currency`           | String  |
| `af_date_a`         | `Date1`              | String  |
| `af_date_b`         | `Date2`              | String  |
| `af_city`           | `CustomerCity`       | String  |
| `af_region`         | `CustomerRegion`     | String  |
| `af_country`        | `CustomerCountry`    | String  |
| `af_coupon_code`    | `OrderPromoCode`     | String  |
| `af_param1`         | `IR_OrderDiscount`   | decimal |
| `af_param2`         | `IR_ItemSubTotal`    | decimal |
| `af_param3`         | `IR_CustomerStatus`  | String  |
| `af_param4`         | `CustomerEmail`      | String  |
| `af_param5`         | `IR_CustomerId`      | String  |

</details>

{% hint style="success" %}
**Note:** If you want to update the default mapping for `event_values`, [contact support](https://app.impact.com/support/portal.ihtml?createTicket=true).
{% endhint %}

**JSON example**

The example below shows passing item-level data.

{% tabs %}
{% tab title="JSON" %}

```json
event-value={
  "af_order_id":"AF_test6", 
  "af_currency":"USD", 
  "af_coupon_code":"SALE20", 
  "af_city":"Santa Barbara", 
  "af_region": "CA", 
  "af_country":"USA", 
  "af_param1":"10.55", 
  "af_param2"::"123.45", 
  "af_param3":"NEW", 
  "af_param4":"914FEC35CE8BFA1A067581032F26B053591EE38A",
  "af_content_type":["hat","glasses", "bracelet"], "af_content_id":["sku-000","sku010","sku011"],
  "af_quantity":[1,2,2],
  "af_price":[35.21,300.03,250]
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
**Warning:** If you're only reporting order-level data, pass the `af_revenue` parameter, which maps to the impact.com `Amount` parameter — item-level parameters (e.g., `af_price`) will be ignored.\
\
If passing item-level data (`af_content_type`, `af_quantity`, `af_price`) for an event, send it in array format (e.g., `af_quantity = [ItemQuantity1, ItemQuantity2]`) — the order-level `af_revenue` will be ignored.
{% endhint %}

## AppsFlyer attribution link

***

You’ll need to retrieve an AppsFlyer attribution link or generate an AppsFlyer OneLink ([learn more about OneLink in the AppsFlyer Help Center](https://support.appsflyer.com/hc/en-us/articles/115005248543-OneLink-overview)).

Whichever link you retrieve needs to be set as the *Download URL* for your mobile app(s) within the impact.com platform.

{% hint style="success" %}
**Note:** Standard attribution links *do not* support deep linking — only OneLink does.
{% endhint %}

### OneLink

1. On your AppsFlyer dashboard, in the left navigation menu, find the *Collaborate* section and select **Active Integrations**.
2. Select **impact.com**, then select the **Attribution link** tab.
3. Below the *Choose your attribution link type* section, select **Use OneLink**.
4. Below the *Select OneLink template* section, select the relevant template from the drop-down menu.
5. In the *Click attribution link* section, **copy the OneLink** so it can be configured as your app(s) Download URL in impact.com.

#### OneLink example

{% tabs %}
{% tab title="HTTP" %}

```http
acme.onelink.me/3218718612?af_siteid={irpid}&pid=impactradius_int&af_click_lookback=7d&clickid={clickid}&af_sub_siteid={sharedid}&c={iradname}&af_c_id={iradid}&is_retargeting=true&af_dp={gwlurl}
```

{% endtab %}
{% endtabs %}

### Attribution link

1. On your AppsFlyer dashboard, in the left navigation menu, find the *Collaborate* section and select **Active Integrations**.
2. Select **impact.com**, then select the **Attribution link** tab.
3. Below the *Choose your attribution link type* section, select **Use single-platform link**.
4. The *Attribution link parameters* section will allow you to add custom parameters to the click tracking link at the bottom — required parameters for impact.com are already set.
5. Once you have appended the required parameters, **copy the Click attribution link**.

#### Attribution Link example

{% tabs %}
{% tab title="HTTP" %}

```
app.appsflyer.com/id1486762009?af_siteid={irpid}&pid=impactradius_int&af_click_lookback=7d&clickid={clickid}&af_sub_siteid={sharedid}&c={iradname}&af_c_id={iradid}&is_retargeting=true&af_dp={gwlurl} 
```

{% endtab %}
{% endtabs %}

## Configure mobile app(s)

***

See [**Set up Mobile App Tracking**](https://help.impact.com/en/support/solutions/articles/48001237444-set-up-mobile-app-tracking) in the impact.com Help Center for details on configuring a mobile app. This section assumes you’ve already set up an app — it focuses on two key parts related to integrating with AppsFlyer.

### Update Download URL

1. In the impact.com platform, from the top navigation bar, select ![](/files/qPLiENtq33ewHc3tmEP4) **\[User profile] → Settings**.
2. In the right column, select [**Mobile Apps**](https://app.impact.com/secure/advertiser/tracking-settings/mobileapps/view-mobile-apps-flow.ihtml?).
3. In the list, find the mobile app that you want to modify and select ![](https://res.cloudinary.com/product-enablement/image/upload/v1768910844/Accessibility%20Icons/More_vNext.svg) **\[More] → View/Edit**.
4. Find the Download URL line item and paste in the URL from AppsFlyer (either the attribution link or OneLink), and make sure to append the following required query string parameter:

```
af_siteid={irpid}&pid=impactradius_int&af_click_lookback=7d&clickid={clickid}&af_sub_siteid={sharedid}&c={iradname}&af_c_id={iradid}&is_retargeting=true&af_dp={gwlurl}
```

### Manage Event Codes

For each additional in-app event you’re tracking, you’ll need to configure it as an Event Code for your mobile app. Once added, this will make the event payable to partners.

1. In the impact.com platform, from the top navigation bar, select ![](/files/qPLiENtq33ewHc3tmEP4) **\[User profile] → Settings**.
2. In the right column, select [**Mobile Apps**](https://app.impact.com/secure/advertiser/tracking-settings/mobileapps/view-mobile-apps-flow.ihtml?).
3. In the list, find the mobile app that you want to modify and select ![](https://res.cloudinary.com/product-enablement/image/upload/v1768910844/Accessibility%20Icons/More_vNext.svg) **\[More] → Manage Event**.
4. In the top-right corner of the screen, select **Add Event**.
5. Find the In-App Events line item and select **Add Another Event**.
6. Enter an **Event Display Name** — this is simply a name for this event that will appear in the impact.com platform.
7. Enter the **Event Code** for this event — it must be exactly as it appears under the Partner event identifier line in AppsFlyer.
8. Choose a *Crediting Rule* — in most cases, this will be **Last Click**.
9. Select *Add Another Event* to add another, otherwise select **Save**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integrations.impact.com/integration-guides/for-brands/plugin-integrations/mmp-mobile-measurement/integrate-with-appsflyer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
