pbjs.getAllWinningBids did not count Secure Creatives #1187
Description
Type of issue
Bug
Description
When the ads are served by X-Domain, the pbjs.getAllWinningBids()
didn't include those bid objects.
While in usual pbjs.renderAd
, they are included.
Steps to reproduce
-
Config the line items to serve ads in X-Domain.
-
Load the page and try to make a bid to win.
(This may be tricky. In my local environment, I usually update thebidCpmAdjustment
to set a very high CPM value, so that the bidder can win) -
After the ad content is fetched, check the result of
pbjs.getAllWinningBids()
in browser console.
Expected results
The bid object is shown in pbjs.getAllWinningBids()
The event BID_WON
is emitted.
Actual results
The bid object did not shown in pbjs.getAllWinningBids()
.
The event BID_WON
is emitted, though.
Platform details
Prebid.js v0.23.0
MacOS 10.12.4
Chrome 58.0.3029.96 (64-bit)
node v6.9.2
npm 4.2.0
Other information
My suspect is that pbjs.renderAd
handled the _winningBids
https://github.com/prebid/Prebid.js/blob/master/src/prebid.js#L304
But the secure creatives is not.
https://github.com/prebid/Prebid.js/blob/master/src/secure-creatives.js
I am not very experienced in Prebid.js, but if you can confirm that this is the cause, I can try to make a pull request to fix it.