User-Level Ad Revenue API

  • Updated

Use this API to retrieve user-level revenue data. You can retrieve this data aggregated for a particular user or with one row per impression. User-level revenue data is available eight hours after UTC day end. So, for example, data for UTC 2019-01-01 is available on UTC 2019-01-02 after 08:00.

You can share user-level and impression-level ad revenue data with your mobile measurement partner of choice, such as Adjust, AppsFlyer, GameAnalytics or Singular, for all supported networks. Starting in SDK version 10.3.0, you can also access impression-level user revenue data on the client side. You can read more information about this in the Advanced Settings page.

There is also a Server-to-Server Impression Revenue API by which MAX posts data to a tracking URL of your choosing whenever it records a MAX impression. See the S2S Impression Revenue API documentation page for more information.

As of January 11, 2022, MAX user level revenue fallback value is updated from −1 to 0 when there is no estimated value calculated for Meta Audience Network Bidding. This server-side change applies to all user revenue data products at once (e.g. client side, server-to-server, user reporting daily API)

Request Format

You must authenticate to use this endpoint. To do so, set the value of the URL parameter api_key to your Report Key.

Target URL

https://r.applovin.com/max/userAdRevenueReport?api_key=report-key&date=report-day&platform=app-platform&application=app-package-name&store_id=app-store-id&aggregated=is-aggregated

Request Parameters

Name Description Example
* This API has a request window of 45 days. Make sure the date parameters are within the last 45 days.
aggregated Whether the data should be aggregated (per user) or not (per impression). Defaults to true. false
api_key Reporting key, for authentication. tgCe3d7SFRU0S…304ZKs6ba
application Application package name (for Android) or bundle ID (for iOS). (You cannot use this parameter if you define store_id) com.mycompany.application
date* Day to return data for, in YYYY-MM-DD format. 2019-02-06
platform Application platform: android, fireos, or ios. android
store_id The numeric portion of the iTunes ID on iOS, or the app’s package name on Android. If you do not know the iTunes ID, use the bundle ID instead. You cannot use this parameter if you define application. 1207472156

Response Format

Response Body

{
  "status": 200,
  "url": "https://applovin-externalreports.s3.amazonaws.com/%2Fmediation_reports/report_date%3D1549756800/pub_id%3D12345/mediation_app_id%3D12345/user_report.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190216T000208Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=dataio.amazon.s3.access_key%2F20190216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=e45bdfbd88cbcf4e[…]927dd"
  "ad_revenue_report_url": "https://applovin-externalreports.s3.amazonaws.com/%2Fmediation_reports/report_date%3D1549756800/pub_id%3D12345/mediation_app_id%3D12345/user_report.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190216T000208Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=dataio.amazon.s3.access_key%2F20190216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=e45bdfbd88cbcf4e[…]927dd"
}

Response Parameters

Name Description
ad_revenue_report_url Location of the CSV file with all revenue including estimated Meta Audience Network Bidding data.
fb_estimated_revenue_url Location of the CSV file with only estimated Meta Audience Network Bidding data. Please note that these numbers may differ from actuals since Meta Audience Network Bidding data is calculated using estimated revenue data. This option is only available on aggregated requests.
status Status of the request: 200 if a user report can be accessed.
url Location of the CSV file that excludes estimated Meta Bidding data.

User-Level Revenue Data CSV Format

User-level Revenue Data CSV Example—Aggregated

Ad Unit ID,Placement,IDFA,IDFV,User Id,Impressions,Revenue
da39a3ee5e6b4b0,home_screen,04034992-E5AA-4BA1-890C-5075B2504050,4F2A07BC-315B-11E9-B210-D663BD873D93,20349,27,5.000025
da39a3ee5e6b4b0,level_end,12309422-331C-41A3-9BF5-2D7D1C04A4E0,4F2A0A6E-315B-11E9-B210-AD023491FF20,,11,0.006100

User-level Revenue Data CSV Example—Non Aggregated (Impression Level)

Date,Ad Unit ID,Ad Unit Name,Waterfall,Ad Format,Placement,Country,Device Type,IDFA,IDFV,User ID,Revenue, Ad Placement
2019-07-29 15:53:07.39,97f7d2048121fe62,sc-and-v1,Default Waterfall,BANNER,home-screen,gb,PHONE,34d5d192-4d67-4382-a730-6828a5f769a2,,e41aaf1d-72ea-4c02-8543-27a2ba09a258,0.000079,1642799
2019-07-29 15:49:31.468,97f7d2048121fe62,sc-and-v1,LAT Users,BANNER,level-end,de,TABLET,31dae586-12d9-47dc-99bd-80855feb2afd,,cf-3042e652059847e5b0911dca682e9509,0.006000,202009

Fields

Name Description
Ad Format INTER, BANNER, REWARD (Non-Aggregated only).
Ad Placement The placement ID of the external ad network that showed the ad (Non-Aggregated only).
Ad Unit ID ID of the MAX Ad Unit from which the revenue was generated.
Ad Unit Name Name of the MAX Ad Unit from which the revenue was generated (Non-Aggregated Only).
Country The two-letter country code of the impression (Non-Aggregated only).
Custom Data Custom data passed in from the integration.
Date Time of the impression (Non-Aggregated only).
Device Type PHONE, TABLET (Non-Aggregated only).
IDFA Advertising identifier: IDFA for iOS devices, GAID for Android devices.
IDFV Identifier for vendor.
Impressions The number of ads displayed to the user (Aggregated only).
Network The Ad Network that generated the impression. Ad Network values can be found in the “Network API Name” column of this table. (Non-Aggregated ad_revenue_report_url Only)
Placement The Ad Placement Name where the user generated Impressions and Revenue.
Revenue The revenue generated by the user, in USD, expressed with six-decimal precision.
User ID Optional ID of the user set via AppLovin SDK. (See the “Setting an Internal User ID section below.)
Waterfall MAX Ad Unit Waterfall name (Non-Aggregated only).

Setting an Ad Placement Name

  • // Banners
    AppLovinMAX.setBannerPlacement(ad-unit-id, placement);
    
    // MRECs
    AppLovinMAX.setMRecPlacement(ad-unit-id, placement);
    
    // Interstitials
    AppLovinMAX.showInterstitial(ad-unit-id, placement);
    
    // Rewarded Ads
    AppLovinMAX.showRewardedAd(ad-unit-id, placement);
    
    // Native Ads
    nativeAdLoader.setPlacement( "placement" );
  • // Banners
    UAppLovinMAX::SetBannerPlacement(ad-unit-id, placement);
    
    // MRECs
    UAppLovinMAX::SetMRecPlacement(ad-unit-id, placement);
  • // Banners
    MaxSdk.SetBannerPlacement(ad-unit-id, "placement");
    
    // Interstitials
    MaxSdk.ShowInterstitial(ad-unit-id, "placement");
    
    // Rewarded Ads
    MaxSdk.ShowRewardedAd(ad-unit-id, "placement");
  • // Banners
    adViewAd.setPlacement( "placement" );
    
    // Interstitials
    interstitial.showAd( "placement" );
    
    // Rewarded Ads
    rewardedAd.showAd( "placement" );
    
    // Native Ads
    nativeAdLoader.setPlacement( "placement" );
  • // Banners
    adView.setPlacement( "placement" )
    
    // Interstitials
    interstitial.showAd( "placement" )
    
    // Rewarded Ads
    rewardedAd.showAd( "placement" )
    
    // Native Ads
    nativeAdLoader.setPlacement( "placement" )
  • // Banners
    adView.placement = @"placement";
    
    // Interstitials
    [interstitialAd showAdForPlacement: @"placement"];
    
    // Rewarded Ads
    [rewardedAd showAdForPlacement: @"placement"];
    
    // Native Ads
    nativeAdLoader.placement = @"placement";
  • // Banners
    adView.placement = "placement"
    
    // Interstitials
    interstitial.show(forPlacement: "placement")
    
    // Rewarded Ads
    rewardedAd.show(forPlacement: "placement")
    
    // Native Ads
    nativeAdLoader.placement = "placement"

Setting an Internal User ID

If you want to tag users with your own internal User ID, do so with code like the following. The maximum size of the User ID string is 8192 characters.

  • MaxSdk.SetUserId("user-id");
  • AppLovinSdk.getInstance( context ).setUserIdentifier( "user-id" );
  • AppLovinMAX.setUserId("user-id");
  • AppLovinSdk.getInstance( context ).userIdentifier = "user-id"
  • [ALSdk shared].userIdentifier = @"user-id";
  • ALSdk.shared()!.userIdentifier = "user-id"

Custom Data

If you want to tag received data/postbacks with custom String data, do so with the code like the following. AppLovin recommends that you keep the size of the string under 8192 characters.

You must set custom data before you load an ad. Otherwise that data will not appear in the postbacks associated with the ad.

    • MaxSdk.SetBannerCustomData(adUnitId, "custom-data");
    • adView.setCustomData("custom-data");
    • AppLovinMAX.setBannerCustomData(adUnitId, "custom-data");
    • adView.setCustomData("custom-data")
    • adView.customData = @"custom-data";
    • adView.customData = "custom-data"
    • MaxSdk.ShowInterstitial(adUnitId, "placement", "custom-data");
    • interstitial.showAd("placement", "custom-data");
    • AppLovinMAX.showInterstitial(adUnitId, "placement", "custom-data");
    • interstitial.showAd("placement", "custom-data")
    • [interstitialAd showAdForPlacement: @"placement" customData: @"custom-data"];
    • [interstitialAd showAdForPlacement: @"placement" customData: @"custom-data"];
    • MaxSdk.SetMRecCustomData(adUnitId, "custom-data");
    • adView.setCustomData("custom-data");
    • AppLovinMAX.setMRecCustomData(adUnitId, "custom-data");
    • adView.setCustomData("custom-data")
    • adView.customData = @"custom-data";
    • adView.customData = "custom-data";
    • MaxSdk.ShowRewardedAd(adUnitId, "placement", "custom-data");
    • rewardedAd.showAd("placement", "custom-data");
    • AppLovinMAX.showRewardedAd(adUnitId, "placement", "custom-data");
    • rewardedAd.showAd("placement", "custom-data")
    • [rewardedAd showAdForPlacement: @"placement" customData: @"custom-data"];
    • rewardedAd.show(forPlacement: "placement" customData: "custom-data")
    • nativeAdLoader.setCustomData("custom-data");
    • nativeAdLoader.setCustomData("custom-data")
    • nativeAdLoader.customData = @"custom-data";
    • nativeAdLoader.customData = "custom-data"