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

onetag Bid Adapter : add support for price floors, supply chain, and gpid #8675

Merged
merged 6 commits into from
Jul 21, 2022

Conversation

onetag-dev
Copy link
Contributor

@onetag-dev onetag-dev commented Jul 12, 2022

Type of change

  • Feature

Description of change

Add support for price floors, supply chain and gpid

@ChrisHuie ChrisHuie changed the title Add support for price floors, supply chain and gpid in onetagBidAdapter.js onetag Bid Adapter : add support for price floors, supply chain, and gpid Jul 12, 2022
@ChrisHuie ChrisHuie self-requested a review July 19, 2022 15:24
@ChrisHuie ChrisHuie self-assigned this Jul 19, 2022
@ChrisHuie
Copy link
Collaborator

@onetag-dev can you please add a unit test or two around the schain validation function? 🙏

@onetag-dev
Copy link
Contributor Author

@onetag-dev can you please add a unit test or two around the schain validation function? pray
Added, let us know if something else is missing 👍 Thank you

@ChrisHuie ChrisHuie merged commit 9f9f589 into prebid:master Jul 21, 2022
ahmadlob referenced this pull request in taboola/Prebid.js Jul 27, 2022
…gpid (#8675)

* Adds support for price floor, supply chain, GPID

* Removes unused import

* Updates onetag test file

* Remove trailing space

* Add unit tests for schain validation function

Co-authored-by: federico <[email protected]>
ccorbo pushed a commit to ccorbo/Prebid.js that referenced this pull request Jul 27, 2022
…gpid (prebid#8675)

* Adds support for price floor, supply chain, GPID

* Removes unused import

* Updates onetag test file

* Remove trailing space

* Add unit tests for schain validation function

Co-authored-by: federico <[email protected]>
JacobKlein26 pushed a commit to nextmillenniummedia/Prebid.js that referenced this pull request Feb 9, 2023
…gpid (prebid#8675)

* Adds support for price floor, supply chain, GPID

* Removes unused import

* Updates onetag test file

* Remove trailing space

* Add unit tests for schain validation function

Co-authored-by: federico <[email protected]>
jorgeluisrocha pushed a commit to jwplayer/Prebid.js that referenced this pull request May 23, 2023
…gpid (prebid#8675)

* Adds support for price floor, supply chain, GPID

* Removes unused import

* Updates onetag test file

* Remove trailing space

* Add unit tests for schain validation function

Co-authored-by: federico <[email protected]>
Comment on lines +382 to +397
function getBidFloor(bidRequest, mediaType, sizes) {
const priceFloors = [];
if (typeof bidRequest.getFloor === 'function') {
sizes.forEach(size => {
const floor = bidRequest.getFloor({
currency: 'EUR',
mediaType: mediaType || '*',
size: [size.width, size.height]
});
floor.size = deepClone(size);
if (!floor.floor) { floor.floor = null; }
priceFloors.push(floor);
});
}
return priceFloors;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

was this a mistake to set all bid currency to EUR for floors? am seeing a warning when bidding is set in USD:

WARNING: Price Floors: Unable to get currency conversion for getFloor for bidder onetag. You must have currency module enabled with defaultRates in your currency config

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @andyblackwell, that's not a mistake if what is written in documentation is true:

The job of the getFloor() function is to retrieve an appropriate floor for the requesting Bid Adapter, for a given auction context. If a Bid Adapter performs a getFloor() call with a currency different than the currency of the floor data, the module will attempt to perform a currency conversion, utilizing the convertCurrency function in the global Prebid object.

If a currency conversion is successful in getFloor(), the resulting floor will be returned to the requesting Bid Adapter. If the conversion failed, the module will return the original floor currency defined within the selected rule location data set.

So we always request the price floor in EUR, but if conversion fails we pass the original currency (e.g USD) to our server, which makes the right conversion internally. Let me know if you catch something wrong in my point.

Thanks

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.

4 participants