-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pbjs.getAllWinningBids() not working correctly #2238
Comments
After discussing, I think we've decided that, to help prevent discrepancies and confusion around naming, |
Just curious where this is right now ? |
@chefbenjamin We will ship this in next release |
@jaiminpanchal27 1.6 ? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@jaiminpanchal27 @mkendall07 @snapwich I see that #2328 is finished. Does the snippet here have to be changed ? http://prebid.org/dev-docs/toubleshooting-tips.html#see-all-bids-in-the-console also would be good to add a column here which showed if the bid is client side or server side. |
@chefbenjamin Snippet should work as it is. Also since it's a core change, it requires 2nd review so it need some more time to be merged. Yes adding new column makes sense, will update snippet |
@jaiminpanchal27 @mkendall07 @snapwich we just pushed 1.8 on a few sites and I can confirm the multiple render issue related to the snippet is fixed. thankyou. |
Type of issue
bug
Description
Calling
pbjs.getAllWinningBids()
will not work correctly if you have auctions that have multiple adUnits and therefore have multiple winners. I think the issue resides with the logic inauction.js
here: https://github.com/prebid/Prebid.js/blob/master/src/auction.js#L200An auction instance only allows for setting and getting a singular winning bid when it should allow for multiple winning bids.
Also while looking into this I noticed that
auction.setWinningBid
andauctionManger.getAllWinningBids
all function around calls topbjs.renderAd
, which is somewhat confusing since it's a different code path than what is used in targeting for getting winning bids. I think eitherpbjs.getAllWinningBids()
should use a similar code path that is used intargeting.getWinningBids
to eliminate the possibility of discrepancies between the two ORpbjs.getAllWinningBids()
should be renamed to eliminate confusion, maybepbjs.getAllRenderedBids()
or something?Steps to reproduce
Create an auction with multiple adUnits and call
pbjs.getAllWinningBids()
after the auction has ran.Expected results
It returns all of the bids rendered.
Actual results
It returns the last bid rendered.
Other information
This causes the issues highlighted in #2190
The text was updated successfully, but these errors were encountered: