Skip to main content
Version: 4.2.0

Revenue Tracking

Every load and impression event delivers an AdInfo object via the event args.

AdInfo Fields

FieldTypeDescription
PlacementIdstringPlacement ID from the BidMachine dashboard
PricedoubleeCPM ÷ 1000 (e.g. 0.005 = $5 CPM)
PrecisionRevenuePrecisionConfidence level of the reported price
RawDataIReadOnlyDictionary<string, string>Raw metadata; known keys: networkName, dsp, ecpm

Revenue Precision

ValueDescription
ExactReal-time auction price
EstimatedEstimated based on historical data
UnknownPrecision 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
);
};