Closed jsnellbaker closed 4 years ago
Note - based on discussion in https://github.com/prebid/Prebid.js/pull/4479 I have updated this I2I to reflect the revised set of planned changes.
The changes focused on the previous adapter section. With the new changes, adapters don't need to change their implementation, so that section has been removed entirely.
Type of Issue
Intent to Implement (extension to https://github.com/prebid/Prebid.js/issues/3870)
Description
To broaden the capabilities of the initial schain module for Prebid.js, we're looking to introduce a new means for publishers to be able to specify unique schain configs for individual bidders. This ability to selectively override the global schain config (which will continue to exist for more general use-cases) will enable publishers to better describe their relationships/situations with other exchanges, resellers, and other entities within the schain object(s) before it gets passed along to downstream parties.
Further details on the changes to publishers can be found below. Adapters shouldn't expect any changes to the existing documented implementation; any adapters already supporting schain should expect their setup to continue to work as is. If publisher did setup a bidder override, the schain module will assign the appropriate schain config to you on the
bidRequests
object to ensure you receive the correct information.Implementation Details for Publishers
As mentioned above, the changes for publishers are optional. Those setups that only need a single global config will continue to work as is. For those publishers who need more advanced/unique setups, they'll be required to:
The following example demonstrates both means to set the schain object in the Prebid config code:
In the above setup:
bidderB
would read theschain
data from the global configbidderA
would read theschain
data from their special bidder configThe
pbjs.setBidderConfig()
can be called multiple times if you have different configs for different bidders. If it fits the use-case (such as if you're using multiple aliases of the same bidder), a singlebidderConfig
can be shared by multiple bidders by listing them in thebidders
array field.Other Information
Related conversation where this approach was discussed: https://github.com/prebid/Prebid.js/issues/3870 Specific comment link to the thread in that issue: here
PR on setting up bidder level configs and access control on
config.getConfig()
to this bidder data: https://github.com/prebid/Prebid.js/pull/4334