> ## Documentation Index
> Fetch the complete documentation index at: https://help.airbridge.io/llms.txt
> Use this file to discover all available pages before exploring further.

# AppLovin

Airbridge supports AppLovin web campaign tracking. This integration enables measurement of AppLovin web campaigns and allows you to view their attribution data in the Airbridge dashboard.

## Integrate AppLovin web campaigns

Integrate AppLovin web campaigns and view your attribution data in the Airbridge dashboard.

### Required prerequisites

Complete all prerequisites before integrating AppLovin web campaigns.

| Item | Description | Location | Assignee | Reference |
| - | - | - | - | - |
| Set up the AppLovin Conversions API integration | The AppLovin Conversions API integration must be set up to optimize events from AppLovin web campaigns. | Airbridge dashboard | Marketer | [Set up the AppLovin Conversions API integration](#set-up-the-applovin-conversions-api-integration) |
| Set `utmParsing: true` in the Airbridge Web SDK | The `utmParsing` option in the Airbridge Web SDK must be set to `true`. This enables Airbridge to use UTM parameters. | Airbridge Web SDK | Developer | [Automatic UTM parameter setting](https://help.airbridge.io/en/developers/web-sdk#automatic-utm-parameter-setting) |

> [!CAUTION]
>
> **Attention**
>
> The User ID (`user.externalUserID`) in the Airbridge Web SDK must be at least 6 characters long.

### Optional prerequisites

Complete the following prerequisites if needed.

| Item | Description | Location | Assignee | Reference |
| - | - | - | - | - |
| Install the AppLovin Pixel | AppLovin recommends using the AppLovin Pixel together with the Conversions API. If you use the AppLovin Pixel, add custom attributes to your web events. | · Website · Airbridge Web SDK | Developer | · [Conversion API](https://support.applovin.com/en/growth/promoting-your-websites/api/conversion-api) (AppLovin Help Center) · [Add custom attributes to web events (for developers)](#add-custom-attributes-to-web-events-for-developers) |

#### Add custom attributes to web events (for developers)

If you also use the AppLovin Pixel, ask your developer to add custom attributes to your web events. AppLovin uses these custom attributes to measure conversions accurately and prevent duplicate counting. Share the following guide with your developer:

* [Additional web event settings](https://help.airbridge.io/en/developers/web-sdk#additional-web-event-settings)

| Field | Description |
| - | - |
| applovin\_awxrt | The value of the \_axwrt cookie that the AppLovin Pixel stores in the browser. AppLovin uses it to match conversions to ads. |
| applovin\_dedupe\_id | A unique value for each conversion. It prevents duplicate counting when the AppLovin Pixel and the Conversions API integration send the same conversion. |

> [!CAUTION]
>
> **Attention**
>
> Custom attributes (customAttributes) can be up to 2,048 characters long. If the combined length of all custom attributes exceeds 2,048 characters, applovin\_awxrt and applovin\_dedupe\_id may not be passed correctly.

The following example shows how to add custom attributes to an Order Complete event. Set applovin\_awxrt to the value read from the \_axwrt cookie when the event is sent. Set applovin\_dedupe\_id to a value that is unique to each conversion, such as the order ID.

```javascript theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
// Reads the _axwrt cookie value in the browser
function getCookie(name) {
    const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'))
    return match ? decodeURIComponent(match[1]) : undefined
}

airbridge.events.send('airbridge.ecommerce.order.completed', {
    value: 11,
    semanticAttributes: {
        transactionID: 'order_123',
        currency: 'USD',
    },
    customAttributes: {
        applovin_awxrt: getCookie('_axwrt'),
        applovin_dedupe_id: 'order_123',
    },
})
```

### Enter the web page URL in AppLovin settings

1. Create a new campaign in the [AppLovin dashboard](https://ads.applovin.com/).
2. In **\[Campaign URL]>\[Destination URL]**, enter the web URL to send users to. Use the URL of the web page where you set up the Airbridge Web SDK in the prerequisites.
3. Click **Edit** in **\[Tracking parameters]**. Check **\[UTM parameters]** and use them as is. AppLovin prefills the UTM parameters. **\[Measurement partner parameters]** are not used.
4. In **\[Add custom parameters]**, copy and paste each Key and Value below, then click **Add**. You can copy each value in the **\[Web Campaign Integration]** tab in the Airbridge dashboard.

   | Key | Value | Information passed to Airbridge |
   | - | - | - |
   | channel | applovin | Ad channel |
   | campaign\_id | \{CAMPAIGN\_ID} | Campaign ID |
   | ad\_group\_id | \{CREATIVE\_SET\_ID} | Creative set ID |
   | click\_id | \{EVENT\_ID} | Click ID |
5. Check **\[Final URL]** and click **Confirm** to save.

## Set up the AppLovin Conversions API integration

With the AppLovin Conversions API integration, Airbridge sends the events it collects to AppLovin via postbacks. You can use these events to optimize your AppLovin campaigns.

> [!CAUTION]
>
> **Attention**
>
> If you also collect events with the AppLovin Pixel, events are counted twice. To prevent duplicate counting, set applovin\_dedupe\_id. For details, see [Add custom attributes to web events (for developers)](#add-custom-attributes-to-web-events-for-developers).

### Register credentials

Get the Event Key from the AppLovin dashboard. The Event Key is the credential required for the integration.

> [accordion] Find the Event Key in AppLovin
>
> To find the Event Key, go to **\[Account settings]>\[Keys]** in the AppLovin dashboard. The Event Key is the same value that AppLovin's documentation calls the Pixel ID (pixel\_id).

After you get the Event Key, go to **\[Integrations]>\[Ad Channel Integration]** in the Airbridge dashboard and open the **\[Conversions API]** tab on the AppLovin page. In **\[Credentials]**, the first step of **\[AppLovin Conversions API Integration]>\[Integration setup]**, enter the Event Key.

### Map Airbridge events to AppLovin events

> [!NOTE]
>
> **Note**
>
> If there are no event mappings, no events are sent to AppLovin, even after you enable the integration. Map every Airbridge event you want to send to AppLovin.

In **\[AppLovin Event Mapping]**, the second step of **\[Integration setup]**, map each Airbridge event you want to send to an AppLovin event. Only web events can be mapped. To add event mappings, click **Add**.

> [accordion] Map events manually
>
> To map events yourself, select **Map events manually**. Then select an Airbridge event and the AppLovin event to map it to.

> [accordion] Map recommended events
>
> To add recommended events, select **Map recommended events**. In **\[ROAS or CPP campaign]** or **\[CPL campaign]**, select the events to add and click **Done**. You can edit the added event mappings later.
>
> In **\[CPL campaign]**, generate\_lead isn't pre-mapped to an Airbridge event. Select one manually.

Recommended events are predefined by campaign type.

> [accordion] Recommended event mappings: Airbridge events and AppLovin events
>
> | Airbridge event | AppLovin event | Campaign |
> | - | - | - |
> | Open (Web) | page\_view | All campaigns |
> | Product View (Web) | view\_item | ROAS or CPP campaign |
> | Add To Cart (Web) | add\_to\_cart | ROAS or CPP campaign |
> | Initiate Checkout (Web) | begin\_checkout | ROAS or CPP campaign |
> | Order Complete (Web) | purchase | ROAS or CPP campaign |
> | Event you select manually | generate\_lead | CPL campaign |

When you finish mapping, click **Save**. Mapped events are sent only after you save the mapping. To add or change event mappings after saving, click **Edit**. To change a mapped Airbridge event or AppLovin event, click it and select a different event. To delete an event mapping, click the minus (−) icon.

### Enable the Conversions API integration

After you complete the integration setup, turn on the **\[Enable integration]** toggle. Once the Conversions API integration is enabled, Airbridge starts sending all mapped web events to AppLovin via postbacks. If you use the Airbridge events sent through the Conversions API integration to optimize AppLovin campaigns or for similar purposes, disabling the integration can directly affect campaign performance. Check how your campaigns could be affected before you disable the integration.

## Manage agencies

To let agency users integrate with ad channels or view performance and costs from ad channels, an Owner or Internal Marketer must grant them access. Grant access in the **\[Agency Settings]** tab in the Airbridge dashboard. For details, see [Agency Settings](https://help.airbridge.io/en/guides/agency-setting.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.