Skip to main content

Win/Loss notifications

When BidonSDK is used next to your Mediation SDK, it is important to notify BidonSDK about the result of the auction. This is necessary for BidonSDK to be able to optimize the auction and to provide you with the best possible results.

The OpenRTB specification defines the following notifications:

  • The win notice informs the bidder's pricing algorithms of a success, whereas the billing notice indicates that spend should actually be applied.
  • A loss notification is also available to inform the bidder of the reason their bid did not win.

This specification focuses on the real-time interactions of bid request and response and the win and loss notices.

Each ad type implements AdObject interface.

@objc(BDNAdObject)
public protocol AdObject: ExtrasProvider {
var isReady: Bool { get }

@objc(notifyWin)
func notifyWin()

@objc(notifyLossWithExternalDemandId:eCPM:)
func notifyLoss(
external demandId: String,
eCPM: Price
)
}

Win notice

bannerView.notifyWin()
interstitialAd.notifyWin()
rewardedAd.notifyWin()

Loss notice

bannerView.notifyLoss(externalDemandId: "SOME_DEMAND_ID", eCPM: 0.5)
interstitialAd.notifyLoss(externalDemandId: "SOME_DEMAND_ID", eCPM: 0.5)
rewardedAd.notifyLoss(externalDemandId: "SOME_DEMAND_ID", eCPM: 0.5)