Getting bid responses per request [prebid.js]

179 views Asked by At

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?

1

There are 1 answers

0
mmikulski On BEST ANSWER

Create event listener for bidResponse event using pbjs.onEvent() as described in Publisher API Reference.