Conversion API for Lead Generation
此内容尚不支持你的语言。
Use the Conversion API to send lead gen events for your website. AppLovin recommends advertisers use the Conversion API alongside the Axon Pixel to help achieve optimal campaign performance.
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
| Header name | Value |
|---|---|
| Authorization | Your Conversion API key |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
pixel_id | string | true | Your Axon Event Key |
Obtain your Axon Event Key and Conversion API Key from the Keys section of the Axon dashboard.
Response codes
| Code | Meaning |
|---|---|
| 200 | All events processed successfully |
| 400 | Error in the request; entire batch is dropped |
| 401 | Authentication failed |
POST payload
The POST payload of your HTTP request describes the event or events that you submit:
| Name | Type | Required | Description |
|---|---|---|---|
events | ServerEvent[] | true | List of events to submit. All events must be valid. Any invalid event will fail the batch. Maximum batch size is 100. |
Server event
| Name | Type | Required | Description |
|---|---|---|---|
data | EventData | true | The data for this event. See EventData below for the data to send for each Event |
event_source_url | string | true | The complete URL where the event occurred (e.g. https://example.com/product?product_name=widget ) |
event_time | number | true | The current Unix epoch time in milliseconds |
name | string | true | The name for this event. Must be either page_view or generate_lead. Trigger page_view when a user navigates to a new page on your site. Trigger generate_lead when a potential customer expresses interest, typically by submitting a form (for example, when a user submits a contact form to receive more information about a product). |
user_data | UserData | true | Refer to the User data table below with data fields such as aleid, client_id, axwrt, alart, etc. |
dedupe_id | string | false | A unique identifier for this event. This is used for de-duplication. The same pixel event and server-to-server event should have the same dedupe_id. Note, this is different than aleid below |
Event data
data is required for every event.
-
For
page_view, setdatatonull. -
For
generate_lead, always send{ "currency": "«ISO-4217»", "value": «number» }.
| Name | Type | Required | Description |
|---|---|---|---|
currency | string | true | Three-letter ISO 4217 code for currency |
value | number | true | The monetary value of the action, reflecting its quality or true value to your business. Pass a higher value for strong leads and 0 for duplicate submissions or low-quality leads. Leads with a value of 0 may be discounted or excluded from optimization. |
Optional events
The app_open event is for mobile app integrations only.
Trigger this event when a user starts the app.
There is no data object to pass for this event.
User data
| Name | Type | Required | Description |
|---|---|---|---|
alart | string | true* | alart set as a query parameter.*See Sending user identifiers below for more details |
aleid | string | true† | See Sending aleid below for additional details. †Required if present in the URL (sent by AppLovin after ad click) |
axwrt | string | true* | The axwrt set in the Axon Pixel.*See Sending user identifiers below for more details |
client_id | string | true* | A stable first-party user identifier. *See Sending user identifiers below for more details |
client_ip_address | string | true | IP address (without any spaces) of the browser corresponding to the event. You can use either an IPv4 or an IPv6 address. IPv4 is better. |
client_user_agent | string | true | User Agent of the device/browser |
email | string | true* | The user’s email address. Axon automatically hashes this value using SHA-256. You can also provide your own SHA-256 hash if you preprocess the identifier according to Axon’s hashing guidelines. *See Sending user identifiers below for more details. |
esi | string | true | Event source indicator. Use "app" for mobile app events or "web" for website events. |
phone | string | true* | The user’s phone number. Axon automatically hashes this value using SHA-256. You can also provide your own SHA-256 hash if you preprocess the identifier according to Axon’s hashing guidelines. *See Sending user identifiers below for more details. |
user_id | string | true* | Unique identifier to the customer. *See Sending user identifiers below for more details |
country_code | string | false | The user’s billing country code. Follow the ISO 3166 standard. |
idfv | string | false | The user’s identifier for vendors |
ifa | string | false | The user’s identifier for advertisers. idfa or gaid |
os | string | false | The user’s operating system: ios, android, or desktop_os |
sid | string | false | Session ID |
zip | string | false | The user’s billing zip code. Use only the first five digits for U.S. zip codes. |
Sending aleid
aleid is a query parameter that AppLovin adds to website URLs after a user clicks an AppLovin ad.
Use the presence of this parameter to identify which clicks come from AppLovin.
To send the aleid, you can do one of the following:
- If you have the AXON Pixel installed on your site, the AXON Pixel automatically sets the cookie
_axeidwhen it sees thealeidquery parameter. Whenever you see such a cookie, read its value and then send it in your request by making it the value of thealeidquery parameter. - When you see that the
aleidURL query parameter is present, retrieve its value. When your server sees thealeidquery parameter, read the parameter server-side. AppLovin recommends that you set this as an HTTP cookie on your site with name_axeidon your site. Set this cookie to have a one-year expiration time. As in the previous method, whenever you see such a cookie, read its value and then send it in your request by making it the value of thealeidquery parameter.
Sending user identifiers
client_id- If you don’t 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.
axwrt- If you have the AXON Pixel installed on your site, the AXON Pixel automatically sets the cookie
_axwrt. alart- For App users, when you see the
alartURL query parameter is present, retrieve its value. user_id- The unique identifier for a customer in your system. This should be a stable identifier that remains consistent across user sessions.
email- The user’s email address. Axon automatically hashes this value using SHA-256 for privacy protection. You can also provide your own SHA-256 hash if you preprocess the identifier according to Axon’s guidelines.
phone- The user’s phone number. Axon automatically hashes this value using SHA-256 for privacy protection. You can also provide your own SHA-256 hash if you preprocess the identifier according to Axon’s guidelines.
Example payloads
Page view event
{ "events": [ { "event_time": 1741784485001, "event_source_url": "https://applovin.com", "name": "page_view", "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_id", "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" }, "data": null } ]}Generate lead event
{ "events": [ { "event_time": 1741784485001, "event_source_url": "https://applovin.com", "name": "generate_lead", "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_id", "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" }, "data": { "currency": "USD", "value": 30 } } ]}