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

oneVideo Adapter Support for Global & Bidder Specific Supply Chain Object Module (SAPR-13809) #5465

Merged
merged 18 commits into from
Jul 10, 2020
Merged

Conversation

adam-browning
Copy link
Contributor

Type of change

  • [ x] Feature

Description of change

oneVideoBidAdapter now supports global and bidder specific "schain" objects from authorized resellers as described in #4551
For publishers using 3rd party Prebid Server solutions and/or Player Prebid solutions.

Previously you could only pass "bid.params.video.sid" with an integer value indicating the Partner's Organization ID within Video SSP (AKA oneVideo). Using the sid (org id) the adapter would generate a new schain object that would be sent in the outgoing bid-request.
Today, a Partner can choose to set an Global or Bidder specific "schain" object using "pbjs.setConfig()" method.
The oneVideoBidAdapter will pass that object if "sid" is omitted from the bid.video.params bidder config.

Logic

image

Test parameters for validating bids

Important! the test creative only responds in geo US west Coast.

pbjs.setConfig({
  "schain": {
      "validation": "strict",
      "config": {
          "ver": "1.0",
          "complete": 1,
          "nodes": [{
                  "asi": "some-platform.com",
                  "sid": "111111",
                  "hp": 1
          }]
      }
  }
});

var adUnits = [
    {
        code: 'video1',
          mediaTypes: {
            video: {
                  context: 'instream',
                  playerSize: [480, 640]
            }
          },
          bids: [
            {
              bidder: 'oneVideo',
              params: {
                video: {
                  playerWidth: 480,
                  playerHeight: 640,
                  mimes: ['video/mp4', 'application/javascript'],
                  protocols: [2,5],
                  api: [2],
                },
                site: {
                    id: 1,
                    page: 'https://verizonmedia.com',
                    referrer: 'https://verizonmedia.com'
                  },
                pubId: 'HBExchange'
                }
            }
          ]
      }
  ]

Other information

Hi @DeepthiNeeladri I have updated the logic after reviewing
#4551
#4334
This PR will support the Supply Chain Object module and follow the ad-server logic as Vanam Vinay Kumar explained.
could you please review the revised logic.
Thank you!
Adam

@DeepthiNeeladri
Copy link
Contributor

@adam-browning looks good to me (LGTM)

@adam-browning
Copy link
Contributor Author

AFAIK, the failed ci/circleci: build test is Not related to the changes of this PR
Failed spec id: https://github.com/prebid/Prebid.js/blob/master/test/spec/modules/prebidServerBidAdapter_spec.js#L1990

@adam-browning
Copy link
Contributor Author

All tests and checks pass after pulling upstream and merging master today

Copy link
Collaborator

@jsnellbaker jsnellbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @adam-browning

I reviewed the code here, but I'm not sure about the implementation of prebid's schain data.

With the schain module, there is some logic implemented to handle/resolve the global and bidder specific configs (as the point of the bidder config is to overwrite the global config). That data is stored in the bidRequest.schain object.

By reading the config object directly, it would be bypassing the setup of any bidder configs (those set up for the prebid module), so you'd only be reading the global config.

Was this intended? Please clarify when you can, and please let me know if you have any questions about the above.

@adam-browning
Copy link
Contributor Author

Hi @jsnellbaker,
Thank you for pointing that out.
I have tried to use bidRequest.schain but it does not return the Global or BidderSpecific schain.
I will investigate further

@adam-browning
Copy link
Contributor Author

Hi @jsnellbaker,
I have updated the logic to pull from bidRequest.schain.
would appreciate your review when convenient.
Thanks in advance,
Adam

Copy link
Collaborator

@jsnellbaker jsnellbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the updates, I think they look good now. This PR can be merged.

I would also recommend creating a docs PR to update the adapter file (here) to note it supports schain. The following variable just needs to be added to the top section of the file:
schain_supported: true

@jsnellbaker jsnellbaker merged commit a2ec9c2 into prebid:master Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants