To retrieve the name of the DSP for a MAX ad served from AppLovin Exchange, call the ad’s getDspName() method:
You can access impression-level user revenue data on the client side. You can use this data to compare different sources and campaigns. You can also access this data by using the MAX user revenue API. MMPs who want to access this data should review the impression-level user revenue API for MMPs documentation.
[COMPONENT: AdRevenueAttribution]
You can retrieve the revenue amount in all ad lifecycle callbacks.
Do this by creating a MaxAdRevenueListener, implementing its onAdRevenuePaid() method, and passing that listener to setRevenueListener().
The following example shows how to implement such an “ad revenue paid” callback:
You can also retrieve a precision evaluation for the revenue value, as shown in the following example:
[COMPONENT: PrecisionValues]
To listen for an ad request, set a MaxAdRequestListener, implement its onAdRequestStarted() method, and pass that listener to setRequestListener().
The following example shows how to implement such an “ad request started” callback:
You can initialize the SDK with specific ad units by specifying your ad units in the AppLovinSdkInitializationConfiguration.
If you do so, the SDK only initializes those networks that you configured for the ad units you specify.
If you do not specify any ad units, the SDK assumes the current session needs all your ad units.
In such a case it initializes all networks that you configured for those ad units.
The following example shows how you implement this feature:
[COMPONENT: SdkKey]
[COMPONENT: WaterfallInformationAPI]
[COMPONENT: AdLoadStateValues]
You can customize banner and MREC ad refresh intervals via the API, just as you can configure them in the Ad Unit UI. The minimum and maximum refresh intervals allowed are 10 seconds and 120 seconds, respectively. MAX ignores values outside these limits. The following code samples show you how to customize these refresh intervals:
| value | explanation |
|---|---|
| 0 | Ad Load Not Attempted |
| 1 | Ad Loaded |
| 2 | Ad Failed To Load |
You can set a placement name for each ad unit (for example, “Rewarded VideoLevels”, “INTER_levelEnd”, or “RewardedVideoCoinStore”). This can help you gather statistics for different placement categories. The following snippets show you how to set the placement name for different ad formats.
You can share impression-level ad revenue data with your mobile measurement partner of choice, such as Adjust for all supported networks.
You can retrieve the creative ID and the network name of displayed ads from mediated networks. Refer to the Creative Debugger documentation for more information.
You can mute audio for some mediated SDK networks when you launch your app. The networks that support this feature via the AppLovin SDK are:
{props.iosNetworksIncluded ?? true ?
For other networks, consult your network’s account team to learn whether this feature is available and how to access it.
The following code snippets show how you mute audio on those networks that support this feature:
This precision takes one of the following values:
"publisher_defined"
: the revenue amount is the price assigned by the publisher
"exact"
: the revenue amount is the result of a real-time auction
"estimated"
: the revenue amount is based on Auto-CPM or FB Bidding estimates
"undefined"
: no revenue amount is defined and there is not enough data to estimate
""
: revenue and precision are not valid (for example, in test mode)
You can find your SDK key in the Account > General > Keys section of the AppLovin dashboard.
To verify that you enabled verbose logs, check for the line that reads Verbose Logging On: true in the initialization section of the AppLovin SDK logs:
AppLovin SDK tags its logs with the tag “/AppLovinSdk: [AppLovinSdk]”.
The Waterfall Information API tells you about the current waterfall for an ad (one that has loaded or failed to load). The API returns the ad load state, latency, credentials, and mediated network information for each ad in the waterfall. If an ad in the waterfall fails to load, the API provides error information.
[COMPONENT: AdPlacements]
[COMPONENT: MuteAudio]
[COMPONENT: MuteCaution]
Enable verbose logs by setting a boolean flag in the settings object of the SDK:
You can also enable verbose logging by editing your application’s Android Manifest file.
Add a <meta-data> element like the following:
[COMPONENT: VerboseLogging]
[COMPONENT: CreativeIDNetworkName]
The value of ad.getRevenue()/ad.revenue may be -1in the case of an error.
When you use selective init, MAX excludes any ad units that you do not explicitly specify from serving ads for the current session.
Selective init has no effect when you enable test mode.
If the waterfall is empty, MaxError.getWaterfall() returns null.
If so, you cannot interrogate the waterfall properties.
However, you can retrieve the ad load latency for an empty waterfall by calling the getRequestLatencyMillis() method:
“Take Ad-Revenue Attribution to the Next Level With MAX” from AppLovin’s Blog
Set the mute state before you load ads. Some networks (like Google bidding and Google AdMob) return muted or unmuted videos depending on what the mute state is before ad load.
Note: if you mute ads, this may result in lower ad revenue.
For banners and MRECs you must set the placement name before you load the banner or MREC.