> For the complete documentation index, see [llms.txt](https://help.branch.io/llms.txt).

# Enable AppLovin (New)

> Integrate AppLovin with Branch for seamless mobile marketing, user acquisition, and retargeting on iOS and Android.

## Overview

[AppLovin](https://www.applovin.com/en) is a mobile marketing platform offering user acquisition and retargeting across iOS and Android. Connect AppLovin to Branch to attribute clicks and installs, configure Postbacks, and import cost data into a single workspace.

For more information about integrating ad partners in general, visit our [Ad Partner Integration Guide](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md).

> **Note: this guide is for new Branch**
>
> Please note that this guide is about integrating AppLovin in the [new Branch experience](https://help.branch.io/marketer-hub/new-branch-overview.md). For information on AppLovin in legacy Branch, visit our [legacy guide](https://help.branch.io/marketer-hub/applovin.md).

### Partner capabilities

| Capability | Details |
| --- | --- |
| Company type | Non-SAN ad network |
| Deep linking | Supported |
| Attribution | Click-through attribution, View-through attribution |
| Ad campaign types | Acquisition campaigns, Retargeting campaigns |
| Click types | Client-side click, Server-side click |
| Supported platforms | iOS, Android |
| Link wrapping | Supported |
| Cost ingestion support | Supported |
| Cost ingestion types | API |
| Pricing models | CPI, CPA |

## Before you begin

To set up the AppLovin integration, you need:

- Ad partner integrations enabled for your Branch account. Availability varies by Branch plan. See [Branch pricing](https://www.branch.io/pricing/) or contact your Branch representative.
- A Branch account with access to **Configuration > Ad Partners** and admin permissions to enable and configure integrations.
- The Branch SDK implemented in your app ([iOS](https://help.branch.io/developer-hub/ios-sdk-overview.md) | [Android](https://help.branch.io/developer-hub/android-sdk-overview.md)) with [event tracking](https://help.branch.io/developer-hub/track-branch-events.md) configured.
- An AppLovin account with your **SDK Key** available from your AppLovin account settings.
- [PAM](https://help.branch.io/marketer-hub/predictive-aggregate-measurement.md) enabled (recommended).

> **Note: PAM uses two separate toggles**
>
> The **PAM for Publishers** toggle for this partner, found under **Partner settings** > **Manage account**, is separate from the account-level **PAM switch**. **PAM for Publishers** must be enabled to reconcile conversion events with your partner. To attribute events with PAM, you also need PAM enabled on the [Attribution page](https://help.branch.io/account-hub/attribution-page-new.md) under **Configuration** > **Attribution**. Learn more in our [PAM Overview](https://help.branch.io/marketer-hub/predictive-aggregate-measurement.md#pam-for-publishers).

## Enable AppLovin

1. Navigate to **Configuration > Ad Partners > AppLovin**.
2. Select **Partner settings** to open the **Manage account** dialog.
3. Under **Postback Credentials**, enter your AppLovin **SDK Key**, available from your AppLovin account settings.
4. Select **Save**.

To update these credentials later, select **Partner settings** on the AppLovin page to reopen the **Manage account** dialog.

## Configure attribution

By default, AppLovin uses your global app attribution settings. To set attribution windows specific to AppLovin, enable the **Override global app settings** toggle on the **Attribution windows** tab.

For more information, follow [Configure attribution](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md#configure-attribution) in the general [Ad Partner Integration Guide](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md).

## Configure postbacks

Enabling AppLovin automatically activates postbacks for `OPEN`, `PURCHASE`, and `RATE`. The default postback URL template is:

```
http://rt.applovin.com/pix?event=postinstall&sub_event=${ (name)! }&package_name=<@loop data=app.app_bundles val="bundle"><#if user_data.os == bundle.os><#if bundle.os=="ANDROID">${(bundle.android.package_name)!}<#elseif bundle.os == "IOS">${(bundle.ios.bundle_id)!}<@break/>&sdk_key=${ (ad_network.credentials.sdk_key)! }&platform=${ (user_data.os)! }&idfa=<#if (user_data.os)! == "IOS" && (user_data.idfa)!?has_content >${(user_data.idfa)!}<#elseif (user_data.os)! == "IOS">${(user_data.idfv)!}<#elseif (user_data.os)! == "ANDROID"&& (user_data.aaid)!?has_content  >${(user_data.aaid)!}<#elseif (user_data.os)! == "ANDROID">${(user_data.android_id)!}<#elseif (user_data.os)! == "ROKU" >${(user_data.roku_rida)!}<#elseif (user_data.os)! == "SAMSUNG"  >${(user_data.samsung_ifa)!}<#elseif (user_data.os)! == "LG"  >${(user_data.lg_ifa)!}<#elseif (user_data.os)! == "PANASONIC" >${(user_data.panasonic_ifa)!}<#elseif (user_data.os)! == "WINDOWS"  >${(user_data.windows_aid)!}<#elseif (user_data.os)! == "PLAYSTATION" >${(user_data.playstation_ifa)!}<#elseif (user_data.os)! == "XBOX" >${(user_data.xbox_msai)!}&did=${ (last_attributed_touch_data.~click_id)! }&isclaimable=<#if (last_attributed_touch_data.$3p)! == (ad_network.machine_name)!>1<#else>0&dnt=<#if (user_data.limit_ad_tracking)! >1<#else>0&revenue=${ (event_data.revenue)! }¤cy_code=${ (event_data.currency)! }&device_ip=${ (user_data.ip)! }&country_code={country code}&is_custom_pb=0
```

To add postbacks for additional events or to customize behavior, follow [Configure postbacks](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md#configure-postbacks) in the general [Ad Partner Integration Guide](https://help.branch.io/marketer-hub/ad-partner-integration-guide-new.md).

## Import cost data

AppLovin cost ingestion uses API authentication. The API Key is entered in the same **Manage account** dialog as your postback credentials.

1. From the AppLovin page, select **Partner settings** to open the **Manage account** dialog.
2. Under **Cost Data Credentials**, enter your **API Key**.
3. Select **Save**.

After saving, the **Cost Data** card on the Status tab updates to reflect the connected state.

## Create a Branch Ad Link

To attribute conversions from AppLovin campaigns, create a Branch Ad Link and use it in your AppLovin campaign setup. See [Branch Ad Links](https://help.branch.io/marketer-hub/ad-links-new.md).

## Verify your data

After your integration is connected and events are flowing, you can verify data is reaching Branch:

- **In Branch** [**Liveview**](https://app.branch.io/testing-and-monitoring/events): confirm that events from your app appear in real time. This is the fastest way to confirm SDK events are firing.
- **In Branch** [**Analysis dashboards**](https://help.branch.io/marketer-hub/analysis-dashboards-overview-new.md): review attributed installs, events, and cost data where `Ad Partner Name = AppLovin`.
- **In AppLovin**: confirm that forwarded events are appearing in your AppLovin attribution reporting.

Cost data appears after approximately 24 hours. Confirm campaigns are actively running in AppLovin before troubleshooting missing cost data.

## Data mappings

### Campaign data

Branch populates the following fields from AppLovin campaign data.

| Branch field | Partner data |
| --- | --- |
| `~advertising_partner_name` | `AppLovin` (static) |
| `~campaign` | Campaign name |
| `~ad_set_name` | Ad set name |
| `~ad_name` | Ad name |
