I am using prebid.js in order to do header bidding. My code is very simmilar to the example here:
http://prebid.org/dev-docs/examples/postbid.html
Starting from the row #11 in the example - I set adUnitBids, i.e. which demand tags will participate in the auction.
Once I have a winner in the auction (look at the line #64 in the example) I have params variable holding the auction result, e.g.
{hb_size: "300x250", hb_pb: "0.70", hb_adid: "519325bc9adf98ef", hb_bidder: "appnexus"}
Now I want to know which tag won. Using the value of params.hb_bidder == "appnexus" I can go through adUnitBids and find the one with bidder == "appnexus". It's not a very illegant solution, but it makes the work done.
The issue starts wen there are more than one tag of the same partner, e.g.:
    var adUnitBids = [
        {
            bidder: 'appnexus',
            params: {
               placementId: '10433394'
            }
        },
        {
            bidder: 'appnexus',
            params: {
               placementId: '123'
            }
        },
    ]
I will know that appnexus won, but not which of the tags (even the index in adUnitBids array would be totally enough for me).
I looked through the list of the available methods in Prebid.js documentation and couldn't find one that can help me with this issue.
Any solution? Thank you in advance.