Impression Level Ad Revenue
The SDK reports the estimated revenue of every paid ad impression through a single event, EmpowerAds.OnAdRevenuePaid. Forward it to your analytics or attribution SDK.
OnAdRevenuePaid works on Android only for now. On iOS the event is never raised.
Banner, native, interstitial, rewarded and app open ads served by Google or AppLovin MAX raise the event. A refreshing banner raises it once per paid refresh. Preroll ads never raise it.
Subscribing to the Event
Subscribe before you call EmpowerAds.Initialize so no impression is missed. The event is raised once per paid impression.
using Empower.MobileAds;
using UnityEngine;
public class AdRevenueReporter : MonoBehaviour
{
void Awake()
{
EmpowerAds.OnAdRevenuePaid += HandleAdRevenuePaid;
}
void OnDestroy()
{
EmpowerAds.OnAdRevenuePaid -= HandleAdRevenuePaid;
}
private void HandleAdRevenuePaid(EmpowerAdRevenue revenue)
{
// Forward the values to your analytics or attribution SDK.
Debug.Log(
$"Ad revenue: {revenue.Value} {revenue.CurrencyCode} " +
$"format={revenue.AdFormat} zone={revenue.ZoneId} " +
$"provider={revenue.Provider} adUnit={revenue.AdUnitId}");
}
}
The EmpowerAdRevenue Object
Each impression delivers an EmpowerAdRevenue object:
| Property | Type | Description |
|---|---|---|
AdFormat | string | The format of the ad that paid: banner, native, interstitial, rewarded or app_open |
ZoneId | string | The zone ID the ad was loaded for |
Provider | string | The ad platform that reported the revenue |
AdUnitId | string | The ad unit that served the impression |
Value | double | Revenue for this impression, in whole currency units |
ValueMicros | long | The same revenue in micro-units (1,000,000 = 1 unit) |
CurrencyCode | string | ISO 4217 currency code of the value (not always USD) |
EventTimeMillis | long | When the SDK received the event, in Unix time milliseconds |
Provider Values
| Value | Ad platform |
|---|---|
Google AdManager | Google Ad Manager |
Google AdMob | Google AdMob |
AppLovin | AppLovin MAX |
Google reports in the currency of the payment account and AppLovin always reports in USD. Check CurrencyCode before you add values up.
Google test ad units report a revenue of 0. That is expected in testing.
Values are per-impression estimates provided by the ad platforms. Totals will not match your dashboard reports exactly.