# AppLovin

> Connect AppLovin with keys from Ads Manager for spend, generate_lead conversions and click tracking.
> Source: https://www.eventsiq.io/docs/applovin


AppLovin has no lead forms, so leads from your AppLovin ads arrive through your own EventsIQ forms,
marked by the AppLovin click ID. Connecting AppLovin lets EventsIQ read your spend and tell AppLovin
which leads sold, so its bidding learns which clicks pay.

:::note{title="What you get"}
-   **Cost tracking**: spend per campaign, every hour, so Reports show return on ad spend.
-   **Conversions**: a postback or a routing lane sends each sale to your AppLovin pixel.
-   **Click tracking**: the AppLovin click ID (`aleid`) is kept with each lead.
:::

## Step 1: Connect AppLovin

AppLovin does not use a sign in window. You connect it with three values from AppLovin Ads Manager.

1. In AppLovin Ads Manager, click your account at the top right, then **Keys**. Only account admins
   see this page.
2. Copy the **Report Key**, the **Conversion API key** and the **Event Key** (your pixel id). If the
   Conversion API key is not there, ask your AppLovin rep to turn it on.
3. In EventsIQ, go to **Connections**, click **Connect an account**, and pick **AppLovin**. Paste the
   three values and click **Connect**. EventsIQ checks both keys with AppLovin, then stores them
   encrypted. Only their last four characters are ever shown.
4. If AppLovin told you your account is under its **restricted lead generation** rules, turn that on
   too. Events are then sent without any email or phone.

One connection is one AppLovin account and its pixel. For a second pixel, connect again with its
Event Key. Connecting needs the **Manage routing** permission, because AppLovin brings in no leads.

## Step 2: Track the click ID

AppLovin adds its click ID (`aleid`, with `alart`) to your landing page by itself after every click,
and EventsIQ keeps it with the lead, so a lead with it is shown as an AppLovin lead. If the AppLovin
Pixel is on your landing page, the click is also kept when the visitor moves to another page before
filling in the form.

For campaign names and ROAS by campaign, add an AppLovin [traffic source](https://www.eventsiq.io/docs/traffic-sources). Its
parameters use AppLovin's macros, such as `campaign_id={CAMPAIGN_ID}`. Add them to the end of the
landing page URL on the campaign in AppLovin Ads Manager.

## Step 3: Read your spend

1. Go to **Integrations**, **Cost tracking**, and click **New integration**.
2. Pick **AppLovin**, your AppLovin traffic source, the connection, and its account.

Spend is read in UTC, a week at a time. AppLovin keeps hourly figures for the last **30 days**
only, so past spend can be imported up to 29 days back.

## Step 4: Report sales back to AppLovin

AppLovin takes one event for lead sites, **generate_lead**, and reads its value as how good the lead
was. A value of 0 tells AppLovin the lead was bad.

-   **A postback**: in **Integrations**, **Conversion API**, pick **AppLovin pixel** and map the one
    postback event that means a sale to `generate_lead`. AppLovin counts a lead once, so only one
    postback event can report to it.
-   **A routing lane** or a [global event](https://www.eventsiq.io/docs/global-events): add an **AppLovin conversion**. Sales
    are sent with their price. Turn on **Send declines to AppLovin at value 0** if you want leads nobody bought sent at
    value 0, so AppLovin learns which ones were bad.

Every event carries the visitor's IP address, browser and page, which leads from your EventsIQ forms
have. A lead without them is skipped with a reason.

:::tip{title="Retrying from Lead logs"}
Every attempt for the same lead is sent with the same event ID, so AppLovin counts the lead once.
:::

## Suppression lists

AppLovin does not offer a way to send it a list of people for web campaigns, so there is no AppLovin
suppression list lane. Ask your AppLovin rep if you need one.

## If something stops

If AppLovin stops accepting a key, the connection shows **Needs you**, the owner gets an email, and
spend and conversions pause. Copy the keys again from AppLovin Ads Manager and paste them with
**Reconnect** on the connection (a key you leave empty keeps the one saved). Then import the missed
spend from the cost tracking integration, within 29 days.
