Wiki
Clone wikiAATKit iOS / Listen to impressions level information
Impressions level information
Index:
- Project Setup
- AATKit Initialisation
- Banner Integration
- Fullscreen Integration
- APP Open Integration
- Native Ads Integration
- Native Ads Integration - special ad network characteristics
- Promo Screen
- Sample
- Disable App Transport Security (ATS)
- Advanced Features
- Targeting
- Rewarded Video
- Frequency Capping
- Header documentation
- Important Remarks
- AATKit's Size within your app
- What is an AdSpace?
- Network-specific Information
- Statistics Delegate
- Reports Delegate
- Listen to impression level information
- AATKit AdMob custom events adapter (>= 2.77.x)
You can now listen to impressions counting for all ad formats by conforming to AATImpressionDelegate
and pass it to the placement
Setting impressionDelegate for infeed-banners placement (AATBannerPlacement)
Objective-C:
+ (void)setPlacementImpressionDelegate:(NSObject <AATImpressionDelegate>* _Nonnull)impressionDelegate forBannerPlacement:(id _Nonnull)placement;
Swift:
class func setPlacementImpressionDelegate(_ impressionDelegate: AATImpressionDelegate, forBannerPlacement placement: Any)
Setting impressionDelegate for Native/Static banners/Fullscreen/Rewarded Video placement (AATKitPlacement)
Objective-C:
+ (void)setPlacementImpressionDelegate:(NSObject <AATImpressionDelegate>* _Nonnull)impressionDelegate forPlacement:(NSObject <AATKitPlacement> *_Nonnull)placement;
Swift:
class func setPlacementImpressionDelegate(_ impressionDelegate: AATImpressionDelegate, for placement: AATKitPlacement)
Setting impressionDelegate for AATBannerCache
Use the following public API in AATBannerCache:
Objective-C:
- (void)setImpressionDelegate:(nullable id<AATImpressionDelegate>)impressionsDelegate;
Swift:
func setImpressionDelegate(_ impressionsDelegate: AATImpressionDelegate?)
AATImpressionDelegate
Objective-C
@protocol AATImpressionDelegate <NSObject> - (void) didCountImpression:(AATKitImpression *)impression; @end
Swift
public protocol AATImpressionDelegate : NSObjectProtocol { func didCount(_ impression: AATKitImpression) }
When an impression is counted, you will get an instance of AATKitImpression
AATKitImpression
Objective-C
@interface AATKitImpression : NSObject @property NSString * _Nullable bannerSize; @property AATKitAdNetwork adNetwork; @property NSString * _Nullable networkKey; @property BOOL isDirectDeal; @property AATMediation mediationType; @property double price; - (instancetype)init NS_UNAVAILABLE; - (NSString *) getAdNetworkName; - (NSString *) getMediationTypeName; @end
Swift
public class AATKitImpression : NSObject { open var bannerSize: String? open var adNetwork: AATKitAdNetwork open var networkKey: String? open var isDirectDeal: Bool open var mediationType: AATMediation open var price: Double open func getAdNetworkName() -> String open func getMediationTypeName() -> String }
getMediationTypeName
method will return the string representation of AATMediation
. It will return one of the following values:
- "WATERFALL" for
AATMediationWaterfall
- "AUCTION" for
AATMediationAuction
- "MAYO" for
AATMediationMayo
back (Home)
Updated