Skip to content

Ad revenue

Pulsark computes estimated revenue and ARPDAU from impression-level revenue reported by your ad SDK. Call trackAdImpression from the paid-event callback.

rewardedAd.onPaidEventListener = OnPaidEventListener { adValue ->
Pulsark.trackAdImpression(
AdImpression(
adUnitId = rewardedAd.adUnitId,
adFormat = "rewarded", // banner | interstitial | rewarded | app_open | native
adSource = rewardedAd.responseInfo.loadedAdapterResponseInfo?.adSourceName ?: "admob",
valueMicros = adValue.valueMicros,
currencyCode = adValue.currencyCode,
precision = when (adValue.precisionType) {
AdValue.PrecisionType.PRECISE -> "PRECISE"
AdValue.PrecisionType.ESTIMATED -> "ESTIMATED"
AdValue.PrecisionType.PUBLISHER_PROVIDED -> "PUBLISHER_PROVIDED"
else -> "UNKNOWN"
},
)
)
}

Register the listener on every ad object (banner, interstitial, rewarded, app open, native). Mediation is supported: adSource records which network served the impression.

Any network with impression-level revenue works the same way — pass the value in micros (1 USD = 1,000,000) and the ISO 4217 currency code.

Metric Definition
ad_impressions De-duplicated paid impressions
est_ad_revenue Sum of reported revenue, USD
est_arpdau Estimated revenue ÷ DAU