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

Index Exchange Bid Adapter: bidder params.size not required; read video parameters from ad unit #6691

Merged
merged 10 commits into from
Jun 8, 2021

Conversation

punkiller
Copy link
Contributor

…aTypes

Type of change

  • [ x ] Bugfix
  • [ x ] Feature
  • [ x ] Does this change affect user-facing APIs or examples documented on http://prebid.org?

Description of change

The bidder level param : params.size is no longer required.
The only required bidder level param will be siteId.
The information about sizes will be read from the adunit mediaTypes object.

Be sure to test the integration with your adserver using the Hello World sample page.

  • contact email of the adapter’s maintainer
  • [ x ] official adapter submission

For any changes that affect user-facing APIs or example code documented on http://prebid.org, please provide:

Other information

@patmmccann
Copy link
Collaborator

Your adapter appears to read most video parameters from the ad unit, can you also change your .MD file to reflect?

const videoAdUnitAllowlist = [
'mimes', 'minduration', 'maxduration', 'protocols', 'protocol',
'startdelay', 'placement', 'linearity', 'skip', 'skipmin',
'skipafter', 'sequence', 'battr', 'maxextended', 'minbitrate',
'maxbitrate', 'boxingallowed', 'playbackmethod', 'playbackend',
'delivery', 'pos', 'companionad', 'api', 'companiontype', 'ext'
'delivery', 'pos', 'companionad', 'api', 'companiontype', 'ext',
'playerSize'
Copy link
Collaborator

Choose a reason for hiding this comment

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

What happens if someone sets h and w on the ad unit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point.

I'll make the change to include that in the allowlist and consider the [w,h] values for size.
A question with the spec ...
I see that w and h are recommended and playerSize is optional.
https://docs.prebid.org/dev-docs/adunit-reference.html#adUnit-video-example

In the case that [playerSize] is not equal to [w,h] , should [w,h] override playerSize ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

W and h are in the openrtb spec; playersize is not.

You can choose what to prefer; whichever you choose, perhaps indicate in doc

Copy link
Collaborator

@patmmccann patmmccann May 14, 2021

Choose a reason for hiding this comment

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

Pbs adapter taking approach of preferring h/w if both specified; 1833 in pbs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice, will check it out

@patmmccann
Copy link
Collaborator

@punkiller @ix-prebid-development confirming you noticed request that the .md file instream example be updated to show mime types, minduration, maxduration and protocols as parameters can come from mediatypes and not just bidder params.

https://github.com/prebid/Prebid.js/blob/master/modules/ixBidAdapter.md

This will solve the only remaining ix issue for #5966 inclusion

This pr will likely affect that file as well where you discuss player size and height at the bottom.

@punkiller
Copy link
Contributor Author

Hi @patmmccann
Thanks for the reminder.
I will add the documentation today, will also try and undraft this PR.

@punkiller punkiller marked this pull request as ready for review May 13, 2021 00:57
@patmmccann
Copy link
Collaborator

Thanks for the .MD updates, removing ix from list of adapters requiring video changes!

@punkiller
Copy link
Contributor Author

You're welcome. Thanks for the suggestions.

modules/ixBidAdapter.js Outdated Show resolved Hide resolved
modules/ixBidAdapter.js Outdated Show resolved Hide resolved
modules/ixBidAdapter.js Outdated Show resolved Hide resolved
modules/ixBidAdapter.js Outdated Show resolved Hide resolved
modules/ixBidAdapter.js Outdated Show resolved Hide resolved
modules/ixBidAdapter.js Outdated Show resolved Hide resolved
@patmmccann
Copy link
Collaborator

Looks like this needs a docs fix on https://docs.prebid.org/dev-docs/bidders/ix for video params as well

@punkiller
Copy link
Contributor Author

@mlb7687 Thanks for the review. Ive resolved your comments.
@robertrmartinez please feel free to review this ...

@punkiller
Copy link
Contributor Author

@patmmccann Acknowledging your docs change request. I am expecting a review here of the .md file as well, so once thats resolved, ill make the docs repo PR

@patmmccann
Copy link
Collaborator

@patmmccann Acknowledging your docs change request. I am expecting a review here of the .md file as well, so once thats resolved, ill make the docs repo PR

Ty, to be more specific, the example config Json is what I noticed

@patmmccann patmmccann changed the title IX bidder params.size not required, reading from ad unit level mediaTypes Index Exchange Bid Adapter: bidder params.size not required; read from ad unit level mediaTypes May 25, 2021
@patmmccann patmmccann changed the title Index Exchange Bid Adapter: bidder params.size not required; read from ad unit level mediaTypes Index Exchange Bid Adapter: bidder params.size not required; read video parameters from ad unit May 25, 2021
@patmmccann
Copy link
Collaborator

also reviewed by @mlb7687

@patmmccann patmmccann merged commit 6dd4c8f into prebid:master Jun 8, 2021
const propInVideoRef = paramsVideoRef && paramsVideoRef.hasOwnProperty(property);

if (!propInMediaType && !propInVideoRef) {
utils.logError('IX Bid Adapter: ' + property + ' is not included in either the adunit or params level');
Copy link
Contributor

Choose a reason for hiding this comment

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

@punkiller (or @lksharma and @umakajan for OOO backup) - Could this line be updated to a logWarn?

This pr duplicates this code execution in buildRequests where previously it was only in isBidRequestValid, the latter makes sense for an error since no request would go out. However when it is run within buildRequests there are instances where we are seeing errors for your adapter but requests are still made.

Maybe a better suggestion would be to move the logging to the buildRequests area instead of in this function?

Copy link
Contributor

Choose a reason for hiding this comment

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

@ix-prebid-support -- for visibility to the thread

Copy link
Contributor

Choose a reason for hiding this comment

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

@ncolletti would you be able to provide us with a test page where our team can debug this issue?

We are not able to reproduce this behaviour at this moment

@bretg
Copy link
Collaborator

bretg commented Aug 13, 2021

docs PR prebid/prebid.github.io#3200

prebidtappx pushed a commit to prebidtappx/Prebid.js that referenced this pull request Nov 15, 2021
…eo parameters from ad unit (prebid#6691)

* not relying on ix bidder params.size, reading from ad unit level mediaTypes

* video impression should have size

* deprecating params.size, reading mediaTypes.video

* mediaTypes.video.[w/h] + update the documentation

* Updating the documentation examples

* addressing Mikes feedback

* IE-11 does not support object.entries()

* cleaning up the video params check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants