Impression Level revenue data (ILRD)
With Impression Level revenue data (ILRD), you can process detailed revenue data. Starting with the Mobile Ads SDK 5.0.0, the SDK provides you with revenue information for each ad impression and information about the advertising network (if mobile mediation is used) that served the ad. This information is provided in real time on the device in the publisher's app. You can handle this data directly or transfer it to a third-party analytics provider.
What data can be obtained
The following data is available to publishers:
|
Field |
Type |
Description |
|
|
string |
Unique ad unit ID. |
|
|
string |
Ad type:
|
|
|
string |
Ad network currency. |
|
|
string |
Revenue per impression in the ad network currency. The |
|
|
string |
Revenue per impression converted to USD. |
|
|
string |
Accuracy of the
|
|
|
string |
Name of the network that served the ad (for Yandex Mediation). |
|
|
string |
Unique ad unit ID in the network that served the ad (for Yandex Mediation). |
Enabling ILRD
-
Integrate the Mobile Ads SDK version 8.0.0 or later by following the instructions (Yandex Advertising Network: Compose Multiplatform, Mobile Mediation: Compose Multiplatform).
-
Implement client-side interfaces to track events.
When working with banner ads, use the
onImpressioncallback inBannerEvents. For fullscreen formats (InterstitialAd,RewardedAd,AppOpenAd), use theonAdImpressioncallback on the corresponding event listener. The callback is triggered when an impression is recorded. TheImpressionDataobject exposesrawData, which contains a JSON string with ILRD.After you obtain a loaded fullscreen ad (typically inside a coroutine started from
rememberCoroutineScope()), attach a listener before callingshow():ad.setAdEventListener( object : InterstitialAdEventListener { override fun onAdShown() {} override fun onAdFailedToShow(adError: AdError) {} override fun onAdDismissed() {} override fun onAdClicked() {} override fun onAdImpression(impressionData: ImpressionData?) { val rawData = impressionData?.rawData } }, ) ad.show()