Skip to main content

AppLovin MAX S2S Impression Revenue API

Last updated 10/03/2026
tip

Note that data generated by third-party data integration counts toward the cluster's data consumption

Summary​

Interface overview​

InterfaceTypeGranularityAttributionCostRevenueImpressionsClicksConversions
MAX S2S Impression Revenue APICallbackUser level✅✅

AppLovin provides a way to send back data through the MAX S2S Impression Revenue API. Whenever a monetization ad is displayed, AppLovin sends impression-level revenue data back to the configured callback link.

Integration process​

  1. Integrate the AppLovin SDK and the AE SDK, and set the AE user identification IDs in the AppLovin SDK
  2. Log in to the AE backend, go to the Third-party Integration module, add an AppLovin MAX S2S Impression Revenue API plan, and complete the related configuration
  3. Log in to the AppLovin dashboard and configure the callback URL
  4. Check whether the AE system receives the data successfully, and build reports

1. Client SDK configuration​

The first step in integrating AppLovin data is to connect the AE SDK with the AppLovin SDK on the client.

1.1 Option 1 (automatic linking)​

  • If you integrate the Android or iOS SDK:

tip

Note that AE SDK initialization and the code that enables automatic integration must run before the AppLovin SDK is initialized. Follow these steps:

1. Initialize the AE SDK.

2. Call `enableThirdPartySharing` to set the distinct ID automatically.

3. Initialize the AppLovin SDK.

The following are code samples for the SDK on each platform:

// 1. Initialize the Android SDK
TDConfig config = TDConfig.getInstance(this, APPID, TE_SERVER_URL);
TDAnalytics.init(config);
// 2. Call the enableThirdPartySharing API to set ta_distinct_id in AppLovin events
TDAnalytics.enableThirdPartySharing(TDThirdPartyType.APPLOVIN_IMPRESSION)
// 3. Initialize the AppLovin SDK
// ...

This option works by automatically calling the setUserIdentifier() method of the AppLovinSdk SDK internally to pass in the distinct ID of the AE project.

1.2 Option 2 (manual linking)​

With manual linking, you use the setUserIdentifier() API in AppLovin to set the distinct ID of the AE project.

tip

Note that AE SDK initialization and the setUserIdentifier call must run before the AppLovin SDK is initialized. Follow these steps:

1. Initialize the AE SDK.

2. Call `setUserIdentifier` to set the distinct ID.

3. Initialize the AppLovin SDK.

The following are manual integration code samples for the SDK on each platform:

// 1. Initialize the Android SDK
TDConfig config = TDConfig.getInstance(this, APPID, TE_SERVER_URL);
TDAnalytics.init(config);
// 2. Get the AE distinct ID, which corresponds to #distinct_id in AE
String distinctId = TDAnalytics.getDistinctId();
// 3. Set the distinct ID in events collected by AppLovin
AppLovinSdk.getInstance(context).setUserIdentifier(distinctId);
// 4. Initialize the AppLovin SDK
// ...

2. Plan configuration​

After completing the SDK configuration, log in to the AE backend and complete the AppLovin MAX S2S Impression Revenue API configuration in the Third-party Integration module. The image below shows the AppLovin configuration page:

2.1 User identification fields​

Because AppLovin sends back user-level data, you need to set user identification rules for it, that is, the fields in the AppLovin callback data that correspond to #distinct_id and #account_id. Based on this configuration, the AE system sets these fields as the user identification fields of the data when it converts the callback data.

If you configured the client SDK as described in the previous step of this document, use the following configuration:

  • Field associated with the account ID: none
  • Field associated with the distinct ID: user_id

2.2 Event Data Configuration​

After you turn on the Event Data Configuration switch, all data sent back is written to the event table. We recommend that you enable event data ingestion.

2.3 User Properties Configuration​

By default, the AE system does not write AppLovin callback data to user properties. To write some fields to the user table, first turn on the rule so that it runs, and then use the Property Mapping feature to add the fields to write to the user table. For Source Property, enter the ingested name of the field. For details, see Section 3.1:

2.4 Configuration​

In the Configuration module, you can control the detailed settings of data pulling, such as the event name after ingestion.

ModuleNameDescription
sink_eventevent_nameEvent name after ingestion; customizable

2.5 End Point​

End Point shows the URL at which the AE system receives AppLovin callback data. Copy this URL directly and use it as the main callback URL when you configure AppLovin callbacks in the next step:

If no URL is displayed here, open Project Settings → Settings → Implementation from the menu in the upper right corner and configure the URL for public network. This URL is the data reporting URL configured in the AE SDK. After configuring it, go back to End Point on the AppLovin configuration page and copy the endpoint URL.

3. Complete the AppLovin callback configuration​

3.1 Callback macro settings​

Finally, you need to configure the callback URL. The fields that can be received in the callback data are called "macros". By default, we recommend that you pull all fields (that is, configure all macros). The following table lists all macros supported by MAX S2S Impression Revenue API:

MacroIngested nameDescriptionRequired or optional
{AD_UNIT_ID}ad_unit_idMAX ad ID
{AD_UNIT_NAME}ad_unit_nameMAX ad name
{AD_UNIT_TEST_NAME}ad_unit_test_nameName of the ad test group
{ALL_REVENUE}all_revenueEstimated revenue, including revenue from FB BiddingYes
{CC}ccTwo-letter Country Code
{CUSTOM_DATA}custom_dataCustom data set through the SDK
{EVENT_ID}event_idUnique event ID
{EVENT_TOKEN}event_tokenEvent token (generated from the unique event ID)
{EVENT_TOKEN_ALL}event_token_allGlobal event token (generated from the unique event ID and all request parameter macros)
{FORMAT}formatAd type
{IDFA}idfaIDFA on iOS or Google Advertising ID on Android
{IDFV}idfvIDFV
{IP}ipUser's IP address
{NETWORK}networkThe Ad Network that displayed the ad
{NETWORK_PLACEMENT}network_placementInternal Placement name of the Ad Network
{PACKAGE_NAME}package_namePackage name: the App Package Name on Android and the Bundle ID (iOS) on iOS
{PLACEMENT}placementPlacement name customized in the SDK
{PLATFORM}platformPlatform
{PRECISION}precision

Precision of the revenue data, which depends on the data source:

  1. publisher_defined: the price set by the publisher
  2. exact: the result of real-time bidding
  3. estimated: an estimate from Auto CPM or FB Bidding
  4. undefined: not enough data to estimate revenue
{REVENUE}revenueEstimated revenue; the value is 0 for FB BiddingYes
{TS}tsTime of the ad impressionYes
{USER_ID}user_idUser ID set by the SDK, which corresponds to the distinct ID of the AE projectYes
{WATERFALL_NAME}waterfall_nameName of the ad Waterfall

The following are the callback macros we recommend. The first part is the callback URL you obtained in Section 2.5. Append the ? and everything after it to the endpoint URL, and provide the result to AppLovin staff to complete the callback URL configuration (use the Server-to-Server Impression Revenue API):

https://{receiver-host}/attribution/callback/applovin/{app-id}?ad_unit_id={AD_UNIT_ID}&ad_unit_name={AD_UNIT_NAME}&ad_unit_test_name={AD_UNIT_TEST_NAME}&all_revenue={ALL_REVENUE}&cc={CC}&custom_data={CUSTOM_DATA}&event_id={EVENT_ID}&event_token={EVENT_TOKEN}&event_token_all={EVENT_TOKEN_ALL}&format={FORMAT}&idfa={IDFA}&idfv={IDFV}&ip={IP}&network={NETWORK}&network_placement={NETWORK_PLACEMENT}&package_name={PACKAGE_NAME}&placement={PLACEMENT}&platform={PLATFORM}&precision={PRECISION}&revenue={REVENUE}&ts={TS}&user_id={USER_ID}&waterfall_name={WATERFALL_NAME}

3.2 Data ingestion rules​

  • user_id in the data is used as the distinct ID of the data. This field should correspond to the distinct ID in the AE project
  • The ts field in the data, that is, the ad impression time, is used as the event's #event_time
  • With the default configuration, the event name is -- applovin_max_s2s_impression_revenue
  • All other fields configured in the callback link are stored

3.3 Standardized fields​

The following event properties are standardized:

Original fieldStandardized fieldDescription
network_namete_ads_object.media_sourceMedia source
ad_mediation_platformte_ads_object.media_sourceMonetization channel
campaign_namete_ads_object.campaign_nameCampaign name
google_ads_campaign_namete_ads_object.campaign_nameCampaign name (Google Ads data only)
google_ads_campaign_idte_ads_object.campaign_idCampaign ID (Google Ads data only)
adgroup_namete_ads_object.ad_group_nameAd group name
google_ads_adgroup_namete_ads_object.ad_group_nameAd group name (Google Ads data only)
google_ads_adgroup_idte_ads_object.ad_group_idAd group ID (Google Ads data only)
creative_namete_ads_object.ad_nameAd name
google_ads_creative_idte_ads_object.ad_idAd ID (Google Ads data only)
ad_revenue_placementte_ads_object.placementMonetization ad placement
google_ads_placementte_ads_object.placementAd placement (Google Ads data only)
cost_amountte_ads_object.costCampaign cost
cost_currencyte_ads_object.currencyCurrency of the user acquisition spend
revenue_usdte_ads_object.revenueMonetization revenue
Fixed value USDte_ads_object.currencyCurrency of the monetization revenue
countryte_ads_object.countryCountry or region code
os_namete_ads_object.platformPlatform, such as Android or iOS
app_idte_ads_object.app_idApp ID
app_namete_ads_object.app_nameApp name
Was this page helpful?