Wiki

Clone wiki

AATKit iOS / Listen to impressions level information

Impressions level information

Index:

  1. Project Setup
  2. AATKit Initialisation
  3. Banner Integration
  4. Fullscreen Integration
  5. APP Open Integration
  6. Native Ads Integration
  7. Native Ads Integration - special ad network characteristics
  8. Promo Screen
  9. Sample
  10. Disable App Transport Security (ATS)
  11. Advanced Features
  12. Targeting
  13. Rewarded Video
  14. Frequency Capping
  15. Header documentation
  16. Important Remarks
  17. AATKit's Size within your app
  18. What is an AdSpace?
  19. Network-specific Information
  20. Statistics Delegate
  21. Reports Delegate
  22. Listen to impression level information
  23. 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