Client SDKs

Ad Events

Track ad impressions and revenue with the Android SDK

Track ad impressions and revenue from your monetization partners.

Basic Usage

AudienceLabSDK.sendAdEvent(
    adId = "rewarded_video_main",
    name = "Main Menu Rewarded",
    source = "admob",
    watchTime = 30.0,
    reward = true,
    mediaSource = "ironsource",
    channel = "rewarded_video",
    value = 0.0125,
    currency = "USD"
)

Parameters

Prop

Type

source vs mediaSource

ParameterMeaningExample
sourceThe ad network that served the impression"admob", "meta_audience_network"
mediaSourceThe mediation platform providing the callback"ironsource", "applovin_max"

Cumulative Tracking

The SDK automatically tracks total_ad_value across all impressions. Persisted in SharedPreferences.

When to Send

Send ad events after the ad completes to capture accurate watch time and reward status.

Cumulative Value

val total = AudienceLabSDK.getTotalAdValue()