Schain as first party data may not work well with bidder-specific schains
Since 10 we treat schain as first party data. Because bidder-specific FPD is merged together with global FPD, and because of how we merge arrays, setting both may not work as expected.
For example,
pbjs.setConfig({
ortb2: {
source: {
schain: {
ver: '1.0',
complete: 1,
nodes: [
{asi: 'global'}
]
}
}
}
});
pbjs.setBidderConfig({
bidders: ['someBidder'],
config: {
ortb2: {
source: {
schain: {
ver: '1.0',
complete: 1,
nodes: [
{asi: 'someBidder'}
]
}
}
}
}
})
would result in someBidder receiving ortb2.source.ext.schain as
{
ver: '1.0',
complete: 1,
nodes: [
{asi: 'global'},
{asi: 'someBidder'}
]
}
@dgirardi to expand on the prebid 10 release notes and deprecated schain module doc
Will there be any further improvements beyound simply mentioning the need to prevent the use of global and bidder-specific data in the spec?
I'm currently testing defining ortb2.source.ext.schain via setBidderConfig() and setting schain1 for special bidders and schain2 for the others. This seems to work fine for my cases.
But if there were a better way, I would be grateful.
Edit: I'm not using the schain module.