Revenue Tracking
Every load and impression event delivers an AdInfo object via the event args.
AdInfo Fields
| Field | Type | Description |
|---|---|---|
PlacementId | string | Placement ID from the BidMachine dashboard |
Price | double | eCPM ÷ 1000 (e.g. 0.005 = $5 CPM) |
Precision | RevenuePrecision | Confidence level of the reported price |
RawData | IReadOnlyDictionary<string, string> | Raw metadata; known keys: networkName, dsp, ecpm |
Revenue Precision
| Value | Description |
|---|---|
Exact | Real-time auction price |
Estimated | Estimated based on historical data |
Unknown | Precision could not be determined |
Revenue Callback
The revenue-paid event (onAdRevenuePaid on Kotlin, didPayRevenue on Swift, RevenuePaid on C#) is fired when a billable impression is recorded — use it to forward revenue data to your analytics platform.
ad.RevenuePaid += (sender, e) =>
{
var adInfo = e.AdInfo;
adInfo.RawData.TryGetValue("networkName", out var network);
analytics.TrackRevenue(
adUnit: adInfo.PlacementId,
revenue: adInfo.Price,
precision: adInfo.Precision.ToString(),
network: network
);
};