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

# Configure the AppLovin Conversion API

> Set up the AppLovin Conversion API in Cometly to send your leads and sales to AppLovin (Axon) server-to-server, matched to the ad click.

The AppLovin Conversion API (CAPI) lets Cometly send your conversion events directly to AppLovin's Axon platform server-to-server, from Cometly's servers to AppLovin's instead of through the visitor's browser. It sends the events you already track in Cometly (leads, sales and other conversions) to AppLovin, matched to the AppLovin ad click that drove them and to the customer's hashed email, phone and customer id.

This matters because AppLovin can then report and optimize on your conversions even when browser-based tracking is blocked or incomplete, including purchases that reach Cometly through a webhook, API or CRM. Setup takes a few minutes: pick a data-sharing mode, paste two keys from AppLovin Ads Manager, check the event map and click **Save**.

> [!NOTE]
>
> AppLovin is being rolled out to accounts in stages. If you don't see **AppLovin** in the **Conversion API** tab, [contact support](https://docs.cometly.com/support/contact.md) and we'll enable it for your space.

## How it works

AppLovin adds a click id called `aleid` to your landing page URL every time someone clicks one of your AppLovin ads. The Cometly pixel (the tracking script on your site) records it as part of the visitor's journey. When Cometly later records a conversion for that visitor, it sends the event to AppLovin with that click id, along with the customer's hashed email, phone and customer id so AppLovin can match it.

1. A visitor clicks your AppLovin ad and lands on a page with the Cometly pixel installed.
2. The visitor converts, on your site or through a webhook, API or CRM event you send to Cometly.
3. Cometly sends the mapped event to AppLovin's Conversion API server-to-server, using your space's Event Key.

For an event to be sent, the Cometly event must be **mapped** to an AppLovin event (see [Check the event map](#set-up-the-applovin-conversion-api)). Events you don't map are never sent.

> [!NOTE]
>
> AppLovin is a Conversion API destination only. There is no AppLovin ad account to connect under Integrations, and you don't need to add anything to your ad URLs: AppLovin appends the `aleid` click id itself. Everything lives in the **Conversion API** tab of Events Manager.

## Before you start

* **Admin access to AppLovin Ads Manager** ([ads.applovin.com](https://ads.applovin.com)). Only account Admins can open the Keys page where both keys live.
* **The Conversion API enabled on your AppLovin account.** AppLovin enables it per advertiser. Once it's on, a **Conversion API Key** appears on the Keys page. If you don't see one, ask your AppLovin representative to enable the Conversion API for your account.
* **The Cometly pixel installed on your landing pages**, so Cometly can capture the `aleid` click id when an AppLovin visitor arrives. See [Install the Cometly pixel](https://docs.cometly.com/getting-started/install-pixel.md).
* **Optional: the AppLovin Pixel on your site.** When it runs alongside the Cometly pixel, Cometly also sends AppLovin's own browser id with each event, which improves match rates.

## Set up the AppLovin Conversion API

**1. Open the Conversion API settings**

Go to **Events Manager**, open the **Conversion API** tab, and expand **AppLovin**.

**2. Choose a data-sharing mode**

Under **Manage Data Sharing**, pick one:

* **Turn off data sharing**: no events are sent to AppLovin.
* **Send all mapped events** (recommended): send every mapped event. Events without an AppLovin click are matched on hashed email, phone and customer id.
* **Send attributed events only**: send only events whose journey includes an AppLovin click (`aleid`).

The mode saves as soon as you pick it, but nothing is sent until you store your keys in the next step.

**3. Paste your AppLovin keys**

Once a mode other than **Turn off data sharing** is selected, the **Configure AppLovin** card appears with two fields:

* **AppLovin Event Key**: the id of your AppLovin pixel. It's the same key that appears in your AppLovin Pixel code.
* **Conversion API key**: the key that authorizes Cometly to send events to your account.

Both come from AppLovin Ads Manager: open your account menu and go to **Keys** ([ads.applovin.com/account/api-keys](https://ads.applovin.com/account/api-keys)). Copy the **Event Key** and the **Conversion API Key** and paste them into the matching fields.

> [!WARNING]
>
> The Conversion API key is encrypted before it is stored and is never shown again. When you come back to this page later, the key field is blank: leave it blank to keep the stored key, including when you change the Event Key. Paste a new key only when you want to replace the stored one.

**4. Check the event map**

Cometly pre-fills the map with your standard events matched to AppLovin's standard web events. One map covers the whole space. Review it, add a row with **Add mapping** for anything missing (custom events included), and remove rows you don't want sent with the trash icon.

The default map:

| Cometly event | AppLovin event |
| - | - |
| Purchase | Purchase |
| Lead | Generate Lead |
| Sign Up | Sign Up |
| Complete Registration | Sign Up |
| Initiate Checkout | Begin Checkout |
| Add to Cart | Add To Cart |
| Add Payment Info | Add Payment Info |
| Subscribe | Subscribe |
| View Content | View Item |

AppLovin events you can choose from: Purchase, Generate Lead, Sign Up, Begin Checkout, Add To Cart, Add Payment Info, View Item, View Cart, Remove From Cart, Subscribe, Login, Search and Page View. These are AppLovin's standard web events. Custom AppLovin event names aren't supported.

**5. Save**

Click **Save** at the bottom of the AppLovin section. Cometly stores your Event Key, encrypts and stores the Conversion API key, and saves the event map. From this point on, every mapped conversion is sent to AppLovin.

## Check it worked

After you click **Save**, Cometly confirms with the message **AppLovin settings saved.** and the badge on the **AppLovin** row of the **Conversion API** tab reads **Active**. When you reopen the section, your Event Key and event map are listed and the key field is blank, with a note that a key is already saved. New mapped conversions reach AppLovin about 15 minutes after Cometly records them.

## Event mapping rules

* **One map and one Event Key per space.** Every event goes to the same AppLovin pixel.
* **Multiple Cometly events can map to the same AppLovin event.** For example, both Sign Up and Complete Registration map to Sign Up by default.
* **Only mapped events are sent.** If a Cometly event isn't mapped, it is never sent to AppLovin.
* **Send purchases as Purchase.** The order amount is sent in your space's currency, along with the transaction id, so AppLovin can report revenue.

## Good to know

* Once active, Cometly sends mapped conversions to AppLovin **going forward**. It does not backfill past events.
* Events reach AppLovin about **15 minutes** after Cometly records them.
* AppLovin needs **at least one identifier** to match an event: a hashed email, a hashed phone, Cometly's customer id or the AppLovin Pixel's browser id. Events with none of these are not sent. Email and phone are hashed with SHA-256 before they leave Cometly.
* **Send attributed events only** relies on the Cometly pixel having seen the `aleid` click id on the landing page. If the visitor landed on a page without the Cometly pixel, the click is unknown to Cometly and the event is not sent in that mode.
* **If you also run the AppLovin Pixel** and it tracks the same event, don't map that event here too. AppLovin only removes duplicates that share a dedupe id, and the pixel's ids won't match Cometly's, so the conversion would be counted twice. Purchases that reach Cometly through a webhook, API or CRM, which the pixel never sees, are the usual reason to use this integration.

## Troubleshooting

> [accordion] No conversions showing up in AppLovin
>
> * Confirm the mode isn't set to **Turn off data sharing**.
> * Confirm the Cometly event is mapped to an AppLovin event. Unmapped events are never sent.
> * Confirm both keys are saved. Until they are, every event is skipped with **Event key or Conversion API key is missing**.
> * Allow about 15 minutes for a new conversion to be sent.
> * In **Send attributed events only** mode, confirm the Cometly pixel runs on the landing pages your AppLovin ads point to.

> [accordion] Events show: Authentication failed, check the Conversion API key
>
> AppLovin rejected the stored key. It may have been revoked or regenerated in Ads Manager. Copy the current Conversion API Key from the Keys page, paste it into the key field and click **Save**.

> [accordion] Events show: Disallowed by mode
>
> The mode is **Send attributed events only** and the event's journey has no AppLovin click. Switch to **Send all mapped events** to send it matched on email, phone and customer id, or check that the Cometly pixel runs on the landing page.

> [accordion] Events show: Conversion action is not mapped
>
> Add the Cometly event to the event map and click **Save**.

> [accordion] Events show: No click ID and/or user identifiers
>
> The event carried no email, phone or customer id, so AppLovin has nothing to match it on. Make sure your conversion events include the customer's email or phone.

> [accordion] Events show: HTTP 400
>
> AppLovin rejected the event, and the message carries its reason. Check that the Event Key is correct, then [contact support](https://docs.cometly.com/support/contact.md) with the message if it keeps happening.

> [accordion] I don't see a Conversion API Key on AppLovin's Keys page
>
> The Conversion API hasn't been enabled for your AppLovin account yet. Ask your AppLovin representative to enable it. The key appears on the Keys page once they do.

> [accordion] I don't see AppLovin in the Conversion API tab
>
> AppLovin is being rolled out to accounts in stages. [Contact support](https://docs.cometly.com/support/contact.md) and we'll enable it for your space.

## Frequently asked questions

### Does turning off data sharing delete my AppLovin keys?

No. **Turn off data sharing** only changes the mode: your Event Key, Conversion API key and event map stay stored. No events are sent while it is off, and sending resumes with the same setup when you pick another mode.

### Can Cometly send webhook or CRM purchases to AppLovin without browser data?

Yes. A conversion that reaches Cometly through a webhook, API or CRM is sent with the details Cometly has, even when it carries no IP address or browser information. The event still has to be mapped and include at least one identifier, such as the customer's email or phone.

### Can I keep one customer's conversion from being sent to AppLovin?

Yes. Flag that event so Cometly records it for attribution and reports but skips the Conversion API. The flag applies to every Conversion API destination in your space, not only AppLovin. See [Exclude an event from the Conversion API](https://docs.cometly.com/guides/conversion-api/exclude-an-event.md).

## Next steps

* [Exclude an event from the Conversion API](https://docs.cometly.com/guides/conversion-api/exclude-an-event.md)
* [Create custom events to map to AppLovin](https://docs.cometly.com/guides/events/custom-events.md)
* [Set up the Conversion API for another ad platform](https://docs.cometly.com/guides/conversion-api/overview.md)
* [Install the Cometly pixel on your landing pages](https://docs.cometly.com/getting-started/install-pixel.md)

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


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