KEMBAR78
OMS Bid Adapter: add usp and update gdpr fields structure in request data by siminkovladyslav · Pull Request #13682 · prebid/Prebid.js · GitHub
Skip to content

Conversation

@siminkovladyslav
Copy link
Contributor

Type of change

  • Updated bidder adapter

Description of change

We want to update data that we send in request:

  1. Add uspConsent to the request
  2. Change structure of gdpr properties in request
  3. Add and update tests related to things mentioned above

@github-actions
Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

@patmmccann
Copy link
Collaborator

-please fix yourself and onomagic to import all of these functions from a shared library

function _isIframe() {
try {
return getWindowSelf() !== getWindowTop();
} catch (e) {
return true;
}
}
function _getMinSize(sizes) {
return sizes.reduce((min, size) => size.h * size.w < min.h * min.w ? size : min);
}
function _getBidFloor(bid) {
if (!isFn(bid.getFloor)) {
return bid.params.bidFloor ? bid.params.bidFloor : null;
}
const floor = bid.getFloor({
currency: 'USD',
mediaType: '*',
size: '*'
});
if (isPlainObject(floor) && !isNaN(floor.floor) && floor.currency === 'USD') {
return floor.floor;
}
return null;
}

@github-actions
Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

@github-actions
Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

@github-actions
Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

@siminkovladyslav
Copy link
Contributor Author

@patmmccann Hi, thanks for you comment!

Done, small note:

getMinSize - I found the same code in 3 more adapters: 33across, marsmedia and medianet, I replaced it for them as well.
isIframe - the same: 33across, valuad and underdogmedia

Please, let me know if you see any other problems, thanks a lot!

@patmmccann
Copy link
Collaborator

thanks!

@patmmccann patmmccann merged commit 30f6455 into prebid:master Jul 30, 2025
19 of 20 checks passed
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.

2 participants