You can set a placement name for each ad unit (for example, “Rewarded VideoLevels”, “INTER_levelEnd”, or “RewardedVideoCoinStore”).
This can help you aggregate statistics for different placement categories.
The following snippets show you how to set the placement name for various ad formats.
You can mute audio for some mediated SDK networks when you launch your app.
The networks that support this functionality via the AppLovin SDK are Google bidding and Google AdMob, AppLovin, DT Exchange, Google Ad Manager, LINE, Mintegral, Tencent, and Verve.
For other networks, consult your network’s account team to learn whether this functionality is available and how to access it.
The following code snippets show how you mute audio on those networks that support this feature:
You can also enable verbose logging by setting AppLovinVerboseLoggingOn to YES in your application’s Info.plist:
Verification
To verify that you enabled verbose logs successfully, 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]”.
Creative ID and Network Name
You can retrieve the creative ID and the network name of displayed ads from various mediated networks.
Refer to the Creative Debugger documentation for more information.
DSP Name
You can retrieve the name of the DSP for a MAX ad served from AppLovin Exchange with code like the following:
Starting in SDK version 10.3.0, 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 refer to the Impression-Level User Revenue API for MMPs page.
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 revenue amount in all ad lifecycle callbacks.
The following example shows how to do this within the “ad revenue paid” callback:
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)
Establishing Ad Request Callbacks
You can listen for when an ad request is made by setting a MAAdRequestDelegate, implementing its [didStartAdRequestForAdUnitIdentifier:] method, and setting that delegate to requestDelegate.
The following example shows how to implement such an “ad request started” callback:
You can initialize the SDK with specific ad units.
If you do so, the SDK only initializes those networks that you have configured for the ad units you specify.
(If you do not specify any ad units, the SDK assumes the current session needs all of your ad units.
If so, it initializes all networks that you have configured for them.)
The following example shows how you implement this feature:
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.
This API is supported as of iOS SDK version 10.3.7.
Note that if the waterfall is empty, MAError.waterfall returns nil and so you cannot interrogate the waterfall properties.
However, you can still retrieve the ad load latency for an empty waterfall via requestLatency:
You can customize banner and MREC ad refresh intervals directly in your integration, just as you can configure them in the Ad Unit UI.
The minimum refresh interval is 10 seconds.
The maximum refresh interval is 120 seconds.
Values outside of these limits are ignored.
The following code samples show you how to customize these refresh intervals:
To prevent interstitial and rewarded ad audio from interfering with your app’s background audio, AppLovin recommends that you stop your app’s background audio before you show an ad.
You can resume your app’s background audio after you hide the ad.