Skip to main content

Impression Level Ad Revenue

The SDK reports the estimated revenue of every paid ad impression, regardless of which ad network served it, through a single callback. It works for all ad formats: banner, interstitial, rewarded, and app open.

Registering the Listener

Register one global listener in your Application class so no impression is missed. It can be set before or after EMAManager.init. Only one listener can be registered, and setting a new one replaces the previous one. Pass null to remove it. The callback runs on the main thread, once per paid impression.

import net.empower.mobile.ads.api.EMAManager

class MyApplication : Application() {

override fun onCreate() {
super.onCreate()

EMAManager.setAdRevenueListener { revenue ->
analytics.logAdImpression(
revenue.value,
revenue.currencyCode,
revenue.provider.value,
revenue.adUnitId
)
}
}
}

The EMAAdRevenue Object

Each impression delivers an EMAAdRevenue object:

FieldTypeDescription
adFormatEMAAdFormatThe format of the ad that paid
zoneIdStringThe zone ID the ad was loaded for
providerEMAAdProviderThe ad platform that served the impression
adUnitIdStringThe ad unit that served the impression
valueDoubleRevenue for this impression, in whole currency units
valueMicrosLongThe same revenue in micro-units (1,000,000 = 1 unit)
currencyCodeStringISO-4217 currency code of the value (not always USD)
eventTimeMillisLongWhen the event was received, in epoch milliseconds

EMAAdProvider Values

ValueDisplay string
GOOGLE_AD_MANAGERGoogle AdManager
GOOGLE_ADMOBGoogle AdMob
APPLOVIN_MAXAppLovin

The value property is a stable display string suitable for forwarding to analytics SDKs.

warning

Values are per-impression estimates provided by the ad platforms. Totals will not match your dashboard reports exactly.