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

updated ozone adapter from v1.4.4 -> v2.0.0 #3828

Merged
merged 4 commits into from
May 22, 2019
Merged

updated ozone adapter from v1.4.4 -> v2.0.0 #3828

merged 4 commits into from
May 22, 2019

Conversation

afsheenb
Copy link
Contributor

  • Feature
  • Refactoring

Description of change

This updated includes several changes:

  • Creates an adId key-value for DFP ad selection for each SSP (see Losing Bid Ad Ids prebid-server#860 for background)
  • Creates a dealID DFP KVP for each SSP should response contain a dealId field
  • Utilises PriceGranularity settings on page to provide pricing DFP KVP keys for rounded pricing
  • Creates a DFP KVP for the Ozone Adapter Version
  • Initial Outstream Video Support

@jsnellbaker jsnellbaker self-requested a review May 14, 2019 20:05
@jsnellbaker jsnellbaker self-assigned this May 14, 2019
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 @afsheenb

Please see the notes below for some things to review. As a question - your description notes that these changes include Initial Outstream Video Support. How much more would need to be added for it to fully handle outstream video?

If it's not fully compliant at this time, you may want to remove the VIDEO type from your supportedMediaTypes to avoid someone from accidentally trying to send a video bid to your system until it's ready.

If your adapter is capable of serving/handling outstream video bids, are there any test params available that I could use to test the delivery? Additionally, could you add these your md file?

Finally, I tried to test your current banner test params (from the .md file) and all I'm getting back is an empty object in the response (ie just {}). Is the test placement/creative still active? Given the changes that are proposed here, I want to make the end-to-end for your adapter is fully working.

Thanks.

let tosendtags = validBidRequests
.filter(
function(ozoneBidRequest) {
if (ozoneBidRequest.hasOwnProperty('mediaTypes') && ozoneBidRequest.mediaTypes.hasOwnProperty(VIDEO)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

As a note - the mediaTypes object exists in the bid param that's passed in the isBidRequestValid function. Instead of checking for the values here in the buildRequests function, you could run those checks earlier.

.map(ozoneBidRequest => {
var obj = {};
obj.id = ozoneBidRequest.bidId; // this causes an error if we change it to something else, even if you update the bidRequest object: "WARNING: Bidder ozone made bid for unknown request ID: mb7953.859498327448. Ignoring."
// obj.id = ozoneBidRequest.adUnitCode; // (eg. 'mpu' or 'leaderboard') A unique identifier for this impression within the context of the bid request (typically, starts with 1 and increments.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove this comment if it's no longer needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

removed - thanks

export const spec = {
code: BIDDER_CODE,
supportedMediaTypes: ['video', 'banner'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use the imported VIDEO and BANNER objects from the mediaTypes file instead of hard-coding the values here.

if (ozoneBidRequest.params.hasOwnProperty('lotameData')) {
obj.ext.ozone.lotameData = ozoneBidRequest.params.lotameData;
}
if (ozoneBidRequest.hasOwnProperty('crumbs') && ozoneBidRequest.crumbs.hasOwnProperty('pubcid')) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You could use utils.deepAccess to try to get a value from a nested object instead of chaining the logic like this.

Copy link
Contributor

Choose a reason for hiding this comment

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

updated - thanks.

@jsnellbaker
Copy link
Collaborator

Hi @afsheenb I see you've been making some updates (thanks!), but it seems like there are some lint errors present with the last commit. Can you take a look at the circleci test results (click the Details link in the section below) and the few changes?

You could also just run gulp lint in your project to have the issues be auto-fixed and then just add/commit those fixes into the PR.

@AskRupert-DM
Copy link
Contributor

AskRupert-DM commented May 21, 2019

hey @jsnellbaker - apologies for the multiple submissions but think this is now good to review.

  • you should see an updated MD file, your previous feedback around some of the code updated in the bidadapter JS, and some sample configs for testing outstream included within the MD file.

Regarding initial support for outstream and your earlier question: currently we only respond with outstream videos from Unruly, and they have requested that we render their creatives with their renderer. In the future, we will deliver other outstream videos and will utilize our own renderer, but this will only be a change in our bidder's response and not require changes client side.

** Updated/edits to my previous comment **

some test pages for you to see code working end to end -

Test page to see all banner and outstream working: http://ozone.tpdads.com/adapter/2.0.0/

Test page to see banner and outstream working: http://ozone.tpdads.com/adapter/2.0.0/unruly.html

The previous comment about geo-targeting hopefully won't apply here as I've been told the geo-targeting restriction should be removed (or will be in the next 20 mins) but let us know if you have any issues.

Note our PBS endpoint has a whitelist so any potential tests you are trying to do on your end may not get a valid bid response unless they are made from one of our whitelisted domains (tpdads.com/silivermine.io are both whitelisted) or you can let us know your testdomain and we can try and add it on our side.

@jsnellbaker
Copy link
Collaborator

Thanks for the updates, clarifications and test pages @afsheenb.
The changes look good now.

@jsnellbaker jsnellbaker merged commit 50de3d4 into prebid:master May 22, 2019
VideoReach pushed a commit to VideoReach/Prebid.js that referenced this pull request Aug 1, 2019
* updated ozone adapter from v1.4.4 -> v2.0.0

* unruly renderer fixes after prebid team feedback, md update

* updating docs and spec to account for customData changes

* fixing whitespace
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