I've been struggling with pbjs
and DFP
for several days now and my current problem is the one described in the title: when I type pbjs.getAllPrebidWinningBids()
in the console, something is returned but nothing is displayed on my test page, and when I type pbjs.getAllWinningBids()
, an empty array is returned and I don't get why.
A few more info :
- This is a test page on our server with no other competition;
- We use custom price buckets;
- In DFP, I have 5 line items from 0.00€ to 2.00€ (so a 0.50€ increment) that matches the custom price buckets in the code;
- The bids are "redirected" in the correct price buckets;
- The code works and an ad is displayed when I set up a self-promotion campaign in DFP with a prebid snippet as a creative, so I suppose that something is wrong with the price buckets.
Would someone have an idea of what is blocking the selection of the bid and the rendering?
Thanks!
EDIT : I've come to realize that it was actually a normal behaviour since pbjs.getAllPrebidWinningBids()
returns the bids that won the auction but haven't rendered on the page yet, while pbjs.getAllWinningBids()
returns those that won but have also rendered.
So my question now is why the hell is no ad rendered at all?!
Here's my code (with a few dummy values), in case someone understand what's wrong: https://jsfiddle.net/8ewz9rgb/2/