Impression Level revenue data (ILRD)
This is an archived version of the documentation. Actual documentation for all platforms can be found here.
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 |
---|---|---|
ad_unit_id | string | Unique ad unit ID . |
adType | string | Ad type:
|
currency | string | Ad network currency. |
revenue | string | Revenue per impression in the ad network currency. The currency field value is used. |
revenue_USD | string | Revenue per impression converted to USD. |
precision | string | Accuracy of the revenue value. Acceptable values:
|
network.name | string | The name of the ad network that served the ad (the parameter is valid for Mobile mediation). |
network.ad_unit_id | string | Unique ad unit ID in the ad network that served the ad (the parameter is valid for Mobile mediation). |
Field | Type | Description |
---|---|---|
ad_unit_id | string | Unique ad unit ID . |
adType | string | Ad type:
|
currency | string | Ad network currency. |
revenue | string | Revenue per impression in the ad network currency. The currency field value is used. |
revenue_USD | string | Revenue per impression converted to USD. |
precision | string | Accuracy of the revenue value. Acceptable values:
|
network.name | string | The name of the ad network that served the ad (the parameter is valid for Mobile mediation). |
network.ad_unit_id | string | Unique ad unit ID in the ad network that served the ad (the parameter is valid for Mobile mediation). |
Enabling ILRD
Implement client-side interfaces/protocols for event tracking.
When implementing the BannerAdEventListener, InterstitialAdEventListener, NativeAdEventListener, and RewardedAdEventListener interfaces, use the
onImpression
method with the ImpressionData parameter. TheonImpression
method is called when an impression is counted. TheImpressionData
asset has a single method,getRawData
, that returns a JSON string with ILRD.public class ExampleNativeAdEventListener implements NativeAdEventListener { // ... @Override public void onImpression(@Nullable final ImpressionData impressionData) { final String rawData = impressionData.getRawData(); // ... } // ... }
Copied to clipboardWhen implementing the YMAAdViewDelegate, YMAInterstitialAdDelegate, YMANativeAdDelegate, and YMARewardedAdDelegate protocols, use the
didTrackImpressionWithData
method with the YMAImpressionData parameter. ThedidTrackImpressionWithData
method is called when an impression is counted. TheYMAImpressionData
asset has a single property,rawData
, that returns a JSON string with ILRD.extension ViewController: YMAAdViewDelegate { // ... func adView(_ adView: YMAAdView, didTrackImpressionWith impressionData: YMAImpressionData?) { guard let rawData = impressionData?.rawData else { return } // parsing rawData } // ... }
Copied to clipboard