I was going through the prebid.js documentation and couldn't find an option to get a response per adapter the second it's done. As it looks, I have to wait for all the adapters to be done and only then can I use the response. This is the snippet I'm using today:
hb.que.push(() => {
hb.addAdUnits(adUnits);
hb.requestBids({
// This callback gets triggered when all bids for this ad unit come back.
bidsBackHandler: (bidResponses) => {
// Do some stuff
},
});
});
Is there an API method I'm missing?
Create event listener for bidResponse event using pbjs.onEvent() as described in Publisher API Reference.