Skip to main content

Impression-Level Ad Revenue

You're able to use impression-level ad revenue data for any MMP or analytics platform using optional callback of AdObjectDelegate interface that provides AdRevenue object as an argument.

public protocol AdRevenue {
@objc var revenue: Price { get }
@objc var precision: RevenuePrecision { get }
@objc var currency: Currency { get }
}

To get the revenue data, you need to implement AdObjectDelegate interface:

func adObject(
_ adObject: AdObject,
didPay revenue: AdRevenue,
ad: Ad
) {
let value = revenue.revenue
let currency = revenue.currency
let networkName = ad.networkName
let demandSourceName = ad.dsp
let adType = ad.adType
let bidType = ad.bidType
let adUnitId = ad.adUnitId
}