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 |
A unique ad unit ID. |
|
|
string |
The type of an ad:
|
|
|
string |
The currency that an ad network uses. |
|
|
string |
Revenue from an impression in the ad network currency. The currency specified in the |
|
|
string |
Revenue from an impression, converted to USD. |
|
|
string |
The accuracy of the
|
|
|
string |
The name of the ad network that served the ad (the parameter is valid for Mobile Mediation). |
|
|
string |
Unique ad unit ID in the network that served the ad (for Mobile Mediation). |
Enabling ILRD
-
Integrate the Mobile Ads SDK version 5.0.0 or later by following the instructions (Boost: iOS, Mobile Mediation: iOS).
-
Implement client-side interfaces/protocols for event tracking.
When implementing the protocols AdViewDelegate, InterstitialAdDelegate, NativeAdDelegate, and RewardedAdDelegate, use the
didTrackImpressionWithDatamethod with theImpressionDataparameter. ThedidTrackImpressionWithDatamethod is called when an impression is counted. TheImpressionDataobject has a single property,rawData, which returns a JSON string with ILRD.extension ViewController: AdViewDelegate { // ... func adView(_ adView: AdView, didTrackImpressionWith impressionData: ImpressionData?){ guard let rawData = impressionData?.rawData else{ return } // parsing rawData } // ... }