Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Proposal: Add support for passing SupplyChain Object to all bidders

Open pm-harshad-mane opened this issue 7 years ago • 29 comments

Type of issue

Proposal New Feature

Description

With Supply Chain Object coming as a new standard, Prebid should have a way to allow publishers to pass the first node of the supply chain object as mentioned in the examples on https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/supplychainobject.md

We can have an option through setConfig API to pass Supply Chain Object which will be passed to all bidders.

pm-harshad-mane avatar May 29 '19 22:05 pm-harshad-mane

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 12 '19 23:06 stale[bot]

Hello @mkendall07 , @jsnellbaker , Any thoughts on supporting schain?

pm-harshad-mane avatar Aug 02 '19 04:08 pm-harshad-mane

I'm not sure at this time, but will keep the ticket open so it can be reviewed more formally.

jsnellbaker avatar Aug 02 '19 15:08 jsnellbaker

Hello @jsnellbaker and @mkendall07 ,

PubMatic wants to support the schain object soon so we are thinking of allowing pubs to set it as follows so that adapters can consume it.

We will make the code changes ready in the next few days.

Let us know your thoughts.

pbjs.setConfig({
                    "schain": {
                        "ver":"1.0",
                        "complete": 1,
                        "nodes": [
                            {
                                "asi":"indirectseller.com",
                                "sid":"00001",
                                "hp":1
                            }
                        ]     
                    }
                });
```code

pm-harshad-mane avatar Aug 07 '19 04:08 pm-harshad-mane

this seems like a reasonable proposal. @bretg for visibility

mkendall07 avatar Aug 07 '19 16:08 mkendall07

Thank you @mkendall07 for the feedback.

pm-harshad-mane avatar Aug 07 '19 18:08 pm-harshad-mane

I agree that this proposal seems reasonable. It would be great if this could get officially adopted ASAP so that we can begin updating the adapters accordingly.

briandamaged avatar Aug 09 '19 17:08 briandamaged

Hello @briandamaged ,

We have started the work, will keep you all posted.

pm-harshad-mane avatar Aug 09 '19 18:08 pm-harshad-mane

Hello @briandamaged ,

I have made some code changes related to schain here, https://github.com/prebid/Prebid.js/compare/master...pm-harshad-mane:small_changes

Please note that changes in utils.js and adapterManager.js are only related to schain.

Flow:

  • adapter manager will validate the schain object
  • if it is valid then only it can be passed on to all bidders
  • bidders do not need to validate again

Let us know your thoughts.

pm-harshad-mane avatar Aug 12 '19 21:08 pm-harshad-mane

Hello @mkendall07 , @jsnellbaker , @bretg I think we need to support schain parameter from Prebid-server JS adapter so that Prebid-server(Go component) can pass it to server-side adapters to forward to respective servers. What do you suggest?

pm-harshad-mane avatar Aug 14 '19 05:08 pm-harshad-mane

Sure, should be easy enough for the prebidServerBidAdapter call getConfig('schain') and add it to the openRTB in source.ext. I don't think any changes would be needed to Prebid Server code at all -- it passes everything through to adapters. So will your change be in this PR or a separate one?

bretg avatar Aug 14 '19 21:08 bretg

Sounds good @bretg , I will add the changes in the same PR

pm-harshad-mane avatar Aug 15 '19 00:08 pm-harshad-mane

Hey all, curious about one thing. I saw that the first round of schain support was merged. I have a concern about bidder instances that might need a different schain object. From what I can see, it looks like schain is currently implemented as a global setting. I can, however, have a couple of different bidders that are set up for different partners. Since each partnership would constitute a different supply chain, each bidder might need a custom schain. Has any thought been given to this yet?

mgriego avatar Aug 30 '19 20:08 mgriego

@mgriego I can see two ways to handle this. Either the bidders can just support their own schain config per ad unit or someone does another PR to enhance the schain support to be scoped per bidder and support multiple schain objects.

mike-chowla avatar Sep 03 '19 15:09 mike-chowla

I agree with @mike-chowla 's suggestion.

pm-harshad-mane avatar Sep 03 '19 18:09 pm-harshad-mane

Just to emphasize on @mgriego 's point. Current implementation (prebid global config to set schain) seems quite wrong. That assumes that only one seller is implemented prebid side. If that was the case, we wouldn't have needed to come up with standard like sellers.json. The reason we need sellers.json is that in most cases, publishers will work with many different resellers (most of them implemented through prebid) and each of those resller will have a different schain config to provide downstream.

For example:

  • Pub A works with SSP1 and SSP2 directly
  • Pub A also works with network 1 and network 2
  • Network 1 works with SSP1 and SSP3
  • Network 2 works with SSP2 and SSP4
  • They are all implemented through prebid

In same prebid configuration, we will need three different schain config to be passed:

  • 1 for the pub (this one is actually empty)
  • 1 for network 1
  • 1 for network 2

This can't be supported with current proposal of having one global prebid config. It needs to be setup at the bidder level (including aliases).

Moreover, current implementation (one global schain for all bidders) would most likely result in bad schain passed to bidders (if a pub tries to implement it despite having multiple sellers in prebid) which would defeat completely the purpose of schain.

jdelhommeau avatar Sep 04 '19 09:09 jdelhommeau

@jdelhommeau I agree that the current implementation doesn't cover the use case you are describing and that's probably a valid use case. When we inventoried our publisher use cases, the every bidder needing the same supply chain object was the common one.

No one has any objection to further enhancement of the schain module to support additional use cases. Since the schain object is passed as part of the bid object, a future enhancement to the schain module can support multiple schain objects scoped to specific bidders. Handling this in schain module seems better than attaching the schain object to every ad unit for every bidder.

As for the whether there will be the wrong supply chain object passed with current approach, the publisher has to build schain module and configure for anything to be passed. Publishers who need different schain objects for different bidders will need to wait till an enhancement is made before using schain module.

mike-chowla avatar Sep 04 '19 14:09 mike-chowla

Thank you @mike-chowla . It may varies per market, but in France, I don't think any of the top 100 publishers doing prebid would have a single schain node for his setup. They would all work with direct integration and at least 1 intermediary partner (MSQ, Sublime, Gravity, teads, etc.), so would need at least two different schain node.

Agree that the schain module is probably the best place to do that, rather than per adUnit setup (would be redundant).

I understand there was a need for quick support, considering tight timeline around sellers.json / schain, but to me, current implementation design is wrong, in the sense that it considers that schain node are an integration level information, while really it is a seller (bidder) level information. It would support basic use case (single seller implemented) but design seems wrong. And if we go live with this, even if we build (what I believe) proper support later on, it will be harder to move people from (legacy) implementation.

jdelhommeau avatar Sep 04 '19 14:09 jdelhommeau

Just wanted to offer support from Centro for the view that SupplyChain should not be global -- we definitely see scenarios like described above by @jdelhommeau.

I do also appreciate the effort made with support for it thus far.

iantri avatar Oct 01 '19 23:10 iantri

Sorry, I don't have a good context here, so I'm a good naive party who can ask you guys to better document the use cases you're concerned about.

My foggy understanding is that each player should be be adding its own node in the chain. I fail to understand why the publisher would need to create separate schains for each bidder before it's sent to each bidder.

In my head, the flow is like this:

  1. pub adds the root node to their schain for their ad server
  2. this chain is sent to every bidder
  3. when bidderA receives the auction request, it adds its own node to the chain 3a. bidderA sends a request to a DSP, which sees an schain of two nodes
  4. when bidderB receives the auction request, it adds its own node to the chain 4a. bidderB sends the auction on to an SSP, which adds its own node to the chain 4b. the SSP sends the request to a DSP, which sees an schain of 3 nodes

Where do I have this wrong?

bretg avatar Oct 02 '19 17:10 bretg