callback event on BidWon
Hi,
I am trying to add a callback event on "BidWon", but seems like addCallback function doesn't care about BidWon. How should I capture it?
Thanks.
Hi @Reduxmedia
Are you trying to listen to an event externally from prebid.js? Currently events are only supported internally in the framework. Can you provide some sample code that you are using so we can understand your use case? Thanks
Happy new year @Reduxmedia!
If by "BidWon" you mean a bid from one of the prebid partners is selected by the adserver, then we don't have an event for that yet. We'll put this in our todo queue and prioritize it accordingly.
If you need it urgently, it can also be pretty easily accomplished by adding a listener to the "pbjs.renderAd" function (if you're using it): http://prebid.org/dev-docs/publisher-api-reference.html#module_pbjs.renderAd
This function will only get triggered when a prebid creative has been chosen by the adserver to serve back to the page. This will be the equivalent to "BidWon". Let us know if this doesn't make sense. Thanks!
Thanks!
@prebid & @Reduxmedia
We already have an event for bidWon, like I mentioned it is only accessible internally. If you want an external handler for it then we'll need to add that as a feature.
https://github.com/prebid/Prebid.js/blob/master/src/prebid.js#L525
Closing this, please reopen if any further info.
Reopening and there will be a PR for this in the next day or two.
PR #204 has been merged. A bidWon event can be registered using the .onEvent() API, as documented in the PR conversation. Closing.