prebid / prebid.github.io

Repo that controls Prebid.org website
http://prebid.org
Apache License 2.0
68 stars 1.17k forks source link

Multiple bidders with the same adapter #798

Closed gavoc closed 6 years ago

gavoc commented 6 years ago

Is it possible to have multiple bidders with the same ad-network adapter?

Description of the problem: We'd like to implement two separate sellers for our inventory, but both of them are technically using the same system for serving ads and therefore both of them should use the same adapter. How is it possible to distinguish them and have them both compete in the same time?

Correct me if I'm wrong, but to my understanding setting a bidder name also sets the adapter to be used.

Thanks a lot.

aneuway2 commented 6 years ago

You should just call the same bidder twice with the specific settings

{
    bidder: "mybidder",
    params: {
        placement: 1111111
    }
},
{
    bidder: "mybidder",
    params: {
        placement: 22222
    }
}
gavoc commented 6 years ago

Thank you for your reply! However with this approach it will not be possible to distinguish the bidders in DFP reports. Is there a way to send another key value or something to mark the bidder's name in DFP along with it?

aneuway2 commented 6 years ago

@gavoc you could alias the second bidder - see http://prebid.org/dev-docs/publisher-api-reference.html#module_pbjs.aliasBidder

You may need to add additional key values for the new bidder name depending on your DFP setup (max 20 chars)

pbjs.aliasBidder('mybidder', 'myotherbidder');
{
    bidder: "mybidder",
    params: {
        placement: 1111111
    }
},
{
    bidder: "myotherbidder",
    params: {
        placement: 22222
    }
}
hb_bidder_myotherbid
gavoc commented 6 years ago

Awesome! I didn't notice aliases before. This solves everything.

@aneuway2 thank you very much for your time!

(closing the thread since it had been solved)