Prebid 12 - pbjs.requestBids - returns all ads, not just ads in paths array.
Hi Group,
I just upgraded to version 12 today and noticed that when I do a request bids on an ad I'm refreshing, it gets bids for all my ads, not just the ad specified in my paths array. Thoughts?
pbjs.que.push(_.bind(function() {
pbjs.requestBids({
timeout: PREBID_TIMEOUT,
adUnitCodes: paths,
bidsBackHandler: _.bind(function(bidResponses) {
// bidResponses comes back with all ads, not just the ads in my paths array
}, this)
});
}, this));
In my console I set a breakpoint and put a watch on the paths and the bidResponses
We are currently using version 8 due to some compatibility problems with IE, but with that version it only returns the skyscraper in the bidResponse since that's all I passed in our paths array.
Checking back on this. Anyone here have a moment to confirm my findings?
@internetchris I'll take a look at this
@internetchris Yes it looks like this is an issue. I'm not sure if it was working properly before or not, but we'll fix it as part of some internal changes we are making to our auction instances.
Do we think this will be resolved by the release of Prebid 0.14.0?
In addition I would like to add that we do dynamic ad loading as the user scrolls down the page and we call the requestBids() method and run into the same problem.
The expected behavior currently is you will see the bid data for the most recent auction a placement participated in. For example, for 5 placements on a page, a bid request is made for all five placements, then for four of the five and then for 3. pbjs.getBidResponses will return:
| placement | auction |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 3 |
| 5 | 3 |
You can filter these results to report on just the most recent auction. Closing as answered, please reopen with any new info.
@protonate
This is for the bidsBackHandler param, not pbjs.getBidResponses. I don't think that has been resolved?
Indeed - thanks for re-opening @mkendall07..... we are really hopeful to see this fixed in v14 - what's the likelihood?
@internetchris #750 should address the issue. It is expected to be released with Prebid 0.14.0.
I've been following the progress of this. If we wanted to use this once it's been merged, it may be reasonable if there hasn't been a bunch of other changes merged since releasing 0.14.0. I will keep a close eye on it.
@internetchris @aforwark #750 is now updated and should fix the issues you've reported. If you are able to test the PR branch for your use case let us know.
I will give this a test tomorrow. Thanks!
Sent from my iPhone
On Nov 6, 2016, at 12:40 AM, Nate Cozi [email protected] wrote:
@internetchris @aforwark #750 is now updated and should fix the issues you've reported. If you are able to test the PR branch for your use case let us know.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@protonate I'm late to the party but just confirming this is working great now, thank you!
@aforwark glad to hear it, thanks for the update.
@protonate - I may be missing something but if I simply pass a single path
pbjs.requestBids({
timeout: PREBID_TIMEOUT,
adUnitCodes: ['/mypath'],
bidsBackHandler: _.bind(function(bidResponses) {
console.log('bidResponses', bidResponses);
I don't get any bidResponses. Is there something new I must do? I just built v0.15.0
You do have an adUnit defined for '/mypath'?
yep:

Code snippet:
console.log('pbjs.adUnits', pbjs.adUnits);
console.log('paths', paths);
pbjs.que.push(_.bind(function() {
pbjs.requestBids({
timeout: PREBID_TIMEOUT,
adUnitCodes: paths,
bidsBackHandler: _.bind(function(bidResponses) {
console.log('bidResponses', bidResponses);
Here's a little more output with the pbjs_debug...


cc/ @mkendall07 - looping you into this conversation too, I know you handled reproducing my original issue. I'm hoping I'm just being dense about this.
Seems like the callback is invoked before the bids have returned, either due to timeout or an issue with bid counts (which we thought had been resolved). Does lengthening the timeout change anything?
Extending the timeout didn't have any affect. I tried 5000ms and then for the heck of it 15000ms, the bidResponse/lack of seems immediate.