Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORTB Converter: Bidder specific SCHAIN copied to source object #11462

Open
robertrmartinez opened this issue May 7, 2024 · 2 comments · May be fixed by #11467
Open

ORTB Converter: Bidder specific SCHAIN copied to source object #11462

robertrmartinez opened this issue May 7, 2024 · 2 comments · May be fixed by #11467
Assignees
Labels

Comments

@robertrmartinez
Copy link
Collaborator

Type of issue

Possible bug?

Description

When the following schain config is set, the intention is it is only sent to that bidder:

This is probably specific for Prebid Server integrations with prebid.js since it has multiple bidders in the call, so the ORTB Converter does not have the logic needed to filter out this schain from the top level since it is just checking if the bidder is in the call?

pbjs.setBidderConfig(
  {
    bidders: ['myBidder'],
    config: {
      schain: {
        validation: 'relaxed',
        config: {
          ver: '1.0',
          complete: 1,
          nodes: [
            {
              asi: 'prebid.com',
              sid: 1234567,
              hp: 1
            }
          ]
        }
      }
    }
  }
);

When the ORTB Converter does its logic to generate the Prebid Server request, it correctly seems to set this here:

ext.prebid.schains =

[
    {
        "bidders": [
            "myBidder"
        ],
        "schain": {
            "ver": "1.0",
            "complete": 1,
            "nodes": [
                {
                    "asi": "prebid.com",
                    "sid": 12345678,
                    "hp": 1
                }
            ]
        }
    }
]

But, it is also copied over to the request.source.ext.schain object like so:

        "schain": {
            "ver": "1.0",
            "complete": 1,
            "nodes": [
                {
                    "asi": "prebid.com",
                    "sid": 12345678,
                    "hp": 1
                }
            ]
        }

I am wondering if this is expected behavior, should the ORTB converter not set this here and just leave the bidder level one shown before?

Test page

https://jsfiddle.net/1zpfas58/1/

Call to PBS Screenshots:

ext.prebid.schains:
image

source.ext.schain:
image

Expected results

I am not too sure (I am not too keen on how schains should work!)

But I believe the top level source.ext.schain should NOT be there?

Actual results

Top level schain is sent

@dgirardi
Copy link
Collaborator

dgirardi commented May 8, 2024

I am not sure. The current logic is

// pass schains in ext.prebid.schains, with the most commonly used one in source.ext.schain

This replaced the previous logic that instead of the most commonly used just picked a random one:

// pass schain object if it is present
const schain = deepAccess(bidRequests, '0.bids.0.schain');

I don't remember if at the time I thought that made sense (now I don't think it does) or if there was any discussion.

Should we just remove it?

@lcorrigall
Copy link

Discussed in PMC: should not set bidder specific schains to the global schain

@dgirardi dgirardi self-assigned this May 8, 2024
@dgirardi dgirardi added the bug label May 8, 2024
@dgirardi dgirardi linked a pull request May 8, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Triage
Development

Successfully merging a pull request may close this issue.

3 participants