Impression Delegate (ILRD)
Listen to placements' impressions events (Impression-Level Revenue Data)
Impression Delegate
AATImpressionDelegate
enables publishers to listen to impression events for all ad formats. Impression listener provides - amongst others - impression-level revenue data (ILRD) as an instance ofAATImpression
object, in case the mediation type is supported (see details below).
Listen to Placement Impressions
To set the impression delegate for a specific placement, use the following code:
If the ad network provides impression-level revenue data, AATKit will use this information during the AATImpression instantiation and pass it to AATImpressionDelegate via the didCountImpression(placement:_:)
callback. Otherwise, AATKit will detect and collect the impression-level information internally and provide it to the impression delegate via the same didCountImpression(placement:_:)
callback. See the accuracy matrix below to learn how exact price information should be for given network and mediation type.
Google Impression-Level Revenue
AATKit uses impression-level revenue data provided by Google to report impressions. To ensure this functionality works correctly for AdMob, please enable the impression-level ad revenue feature in your AdMob UI.
Ad Network
Use the func getAdNetworkName() -> String
method to get the string representation of the AATAdNetwork enum.
Price Information
Use the getPriceInfo
method to get the object representing detailed impression price information (if available), like price, currency and precision type
The price value passed in the impression object is the CPM price.
Accuracy matrix
The accuracy of price information and used currency varies between ad networks and mediation types. Please see the following table for more information.
AmazonHB
Any
Exact
USD
AppNexus
Any
Exact
USD
Criteo
Auction
Exact
USD
Waterfall, MAYO
Exact
EUR
GraviteRTB
Any
Exact
USD
Google: AdMob, AdManager(DFP)
Any
Depends on ad response from the network
USD
Equativ (SmartAdServer)
Auction
Exact
USD
MAYO
Floor price
EUR
Waterfall
no price information
no price information
YOC
Auction
Exact
USD
Waterfall, MAYO
Exact
Depends on ad response from the network
All other networks
Waterfall
no price information
no price information
MAYO
Floor price
EUR
Complete Code Example
The below example can be applied to all types of placements.
Last updated