getAdserverTargeting() for Vast Url parameter ?
Hello,
I'm looking for a function like "getAdserverTargeting()" but to retrieve the Vast url of my winning bid. I'm not using DFP and I have 3 outstream bidders so I would like to manipulate the Vasturl parameter of my winning bid (to send it to my adserver). I didn't find this kind of function in the documentation.
I can only have access to this parameter by doing something like this : bidResponses.video.bids[0].vastUrl But it's not really the winning bid if you have more than one oustream bidder.
Thanks,
Would pbjs.getHighestCpmBids fit your use case? It'll return an array of winning bids for each ad unit, or an array with the winning bid for a single ad unit that's passed to that function as a parameter.
Then to get the vast url, something like
const bid = pbjs.getHighestCpmBids()[0];
const vastUrl = bid && bid.vastUrl;
// ...
Thank you very much @matthewlane . This function is perfect :).
Have a wonderful day.