Conversion API

Use this endpoint to submit events from a server to the AppLovin Conversions API.

Request format

To submit one or more events to the AppLovin Event API, send an HTTP POST request to https://b.applovin.com/v1/event.

Authentication

Your requests must include this HTTP header:

Header nameValue
AuthorizationYour API Access Token

Query parameters

NameTypeRequired?Description
pixel_idstringtrueYour Pixel ID

Response codes

Response codeDescription
200All events processed successfully.
400There is an error with your request. The API dropped this batch of events.
401Authentication failed.

POST payload

The POST payload of your HTTP request describes the event or events that you submit:

NameTypeRequired?Description
eventsServerEvent[]trueList of events to submit. All events must be valid. Any invalid event will fail the batch. The maximum batch size is 100 events.

The ServerEvent object

NameTypeRequired?Description
dataEventData[]trueThe data for this event.
dedupe_idstringtrueA unique identifier for this event. This is used for de-duplication. See Deduplicating events.
event_source_urlstringtrueThe complete URL where the event occurred (e.g. https://example.com/product?product_name=widget).
event_timenumbertrueThe current Unix epoch time in milliseconds.
namestringtrueThe name of this event. See Axon Pixel events and objects for available events.
user_dataUserDatatrueUser data to help identify the user who performed the event.
measurement_partner_dataMeasurementDatafalseMeasurement data to inform how much credit is given to AppLovin for the event.

The EventData object

See Axon Pixel events and objects for the structures of the various EventData objects.

There is also an optional app_open event. Trigger this event when a user starts the app. There is no data object for this event.

The UserData object

NameTypeRequired?Description
aleidstringtrueSee Sending aleid for more details.
client_ip_addressstringtrueIP address (without any spaces) of the browser corresponding to the event. You can use either an IPv4 or an IPv6 address. However, the user’s IPv4 address is typically more stable and changes less frequently than the IPv6 address, and so if you use the IPv4 address you can expect more accurate targeting and attribution.
client_user_agentstringtrueUser Agent of the device/browser
esistringtrueSource of the event: Was it on app or web that this event happened?
alartstringtrue*Set as alart as a query parameter.
*See Sending User Identifiers for more details.
axwrtstringtrue*Set as axwrt in the Axon Pixel.
*See Sending User Identifiers for more details.
client_idstringtrue*A stable first-party user identifier.
*See Sending User Identifiers for more details.
emailstringtrue*The customer email address (can come in SHA-256 hash).
*See Sending User Identifiers for more details.
phonestringtrue*The customer phone number (can come in SHA-256 hash).
*See Sending User Identifiers for more details.
user_idstringtrue*A unique customer identifier.
*See Sending User Identifiers for more details.
ifastringThe user’s identifier for advertisers (idfa or gaid)
idfvstringThe user’s identifier for vendors
osstringThe user’s operating system: android, desktop_os, or ios
country_codestringfalsethe user’s ISO 3166 billing country code
sidstringfalseSession ID
zipstringfalseThe user’s billing zip code. Use only the first five digits for U.S. zip codes.

The MeasurementData object

NameTypeRequired?Description
accounting_modestringtrueEither CASH or ACCRUAL
attribution_modelstringtrueOne of LAST_CLICK, FIRST_CLICK, LINEAR, TIME_DECAY, CUSTOM_MULTI_TOUCH, LAST_NON_DIRECT_TOUCH, CLICKS_AND_VIEWS_ENHANCED, or ANY_CLICK
attribution_sharenumbertrueA number between 0 and 1 that represents how much credit AppLovin gets for the event, based on the given attribution model and lookback
is_claimablebooleantrueA flag that indicates whether AppLovin drove the event
attribution_lookback_window_hoursnumberfalseHow far in the past a touchpoint can occur to gain credit for the conversion, in hours. Leave this empty for infinite lookback.
campaign_idstringfalseAppLovin’s campaign ID
creative_set_idstringfalseAppLovin’s creative set ID (also known as adset ID)
first_purchase_tsnumberfalseThe epoch timestamp, in milliseconds, indicating when the customer first made a purchase with the advertiser.
first_visit_tsnumberfalseThe epoch timestamp, in milliseconds, indicating when the customer first visited the advertiser.
is_new_customerbooleanfalseIndicates whether or not the customer has made a purchase with the advertiser before
is_new_visitorbooleanfalseIndicates whether or not the customer has visited the advertiser before
last_purchase_tsnumberfalseThe epoch timestamp, in milliseconds, indicating when the customer last made a purchase with the advertiser.
last_visit_tsnumberfalseThe epoch timestamp, in milliseconds, indicating when the customer last visited the advertiser.

Sending aleid

aleid is a query parameter that AppLovin adds to website URLs after a user clicks an AppLovin ad. If this query parameter is present, the click resulted from an AppLovin ad. To send the aleid to this API, you can do one of the following:

  1. If you have the AXON Pixel installed on your site, the AXON Pixel automatically sets the cookie _axeid when it sees the aleid query parameter.
  2. When you see that the aleid URL query parameter is present, retrieve its value. When your server sees the aleid query parameter, read the parameter server-side AppLovin recommends that you then set this as an HTTP cookie on your site with the name _axeid. Set this cookie to have a one-year expiration time.

Whichever method you use, when you see such a cookie, read its value and then send it in your Axon Server to Server API request as the value of the aleid query parameter.

Sending user identifiers

AppLovin requires that you send at least one of the following fields:

FieldExplanation
alartFor App users, when you see that the alart URL query parameter is present, retrieve its value.
axwrtIf you have the AXON Pixel installed on your site, the AXON pixel automatically sets the cookie _axwrt.
client_idIf you do not have the AXON Pixel installed on your site, pass another stable first-party cookie you store to identify visitors. It should be globally unique and stay the same across browsing sessions of the user.
email
phone
user_id

Example payload

"events" : [
  {
    "event_time": 1741784485001,
    "event_source_url": "https://applovin.com",
    "name": "purchase",
    "user_data": {
      "client_ip_address": "172.59.8.172",
      "client_user_agent": "chrome/123.456 android mobile",
      "aleid": "«aleid-query-param»",
      "axwrt": "«axwrt-cookie-value»",
	   "user_id": "«user-identifier»",
      "phone": "+1123456789",
      "email": "user@example.com",
      "client_id": "«first-party-identifier»",
      "sid": "«sid»",
      "ifa": "«idfa»",
      "idfv": "«idfv»",
      "os": "macos",
      "esi": "web",
	   "zip": "12345",
      "country_code": "US"
    },
    "measurement_partner_data": {
      "is_claimable": true,
      "attribution_model": "LAST_CLICK",
      "attribution_lookback_window_hours": 24,
      "attribution_share": 0.5,
      "accounting_mode": "ACCRUAL",
      "campaign_id": "456",
      "creative_set_id": "789",
      "is_new_customer": false,
      "last_purchase_ts": null,
      "is_new_visitor": true,
      "last_visit_ts": 1
    },
    "data": {
      "user_id": "«user-identifier»",
      "currency": "USD",
      "value": 30,
      "transaction_id": "«transaction-identifier»",
      "shipping": 5.99,
      "tax": 6,
      "items": [
        {
          "item_variant_id": "«item-variant-identifier»",
          "item_id": "«item-identifier»",
          "item_name": "«item-name»",
          "affiliation": "«affiliation»",
          "item_brand": "«item-brand»",
          "item_category": "«first-item-category»",
          "item_category_id": 604,
          "item_category2": "«second-item-category»",
          "image_url": "«image-URL»",
          "price": 15,
          "discount": 10,
          "quantity": 2
        }
      ]
    }
  }
]
Was this article helpful?
search