-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
New Adapter: Oraki #11727
New Adapter: Oraki #11727
Conversation
modules/orakiBidAdapter.js
Outdated
} | ||
} | ||
|
||
function getPlacementReqData(bid) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do 21 bid adapters use this exact same code block. Is one person committing twenty bid adapters?
If so, can you start to move code blocks into to libraries for better maintenance?
modules/orakiBidAdapter.js
Outdated
}); | ||
return bidFloor.floor; | ||
} catch (err) { | ||
logError(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not log an error when the floors module doesn't exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things to change
modules/orakiBidAdapter.js
Outdated
}, | ||
|
||
buildRequests: (validBidRequests = [], bidderRequest = {}) => { | ||
// convert Native ORTB definition to old-style prebid native definition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a utility function to make old code usable, a new module shouldn't need it
modules/orakiBidAdapter.js
Outdated
try { | ||
refferLocation = refferUrl && new URL(refferUrl); | ||
} catch (e) { | ||
logMessage(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If your test bid requests don't have proper locations this pollutes our circleci output a bunch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please point out the code line that is causing this problem?
modules/orakiBidAdapter.js
Outdated
let location = refferLocation || winLocation; | ||
const language = (navigator && navigator.language) ? navigator.language.split('-')[0] : ''; | ||
const host = location.host; | ||
const page = location.pathname; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's wrong with the page property from the request
modules/orakiBidAdapter.js
Outdated
} | ||
|
||
let location = refferLocation || winLocation; | ||
const language = (navigator && navigator.language) ? navigator.language.split('-')[0] : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't get navigator language, use the request
modules/orakiBidAdapter.js
Outdated
try { | ||
const winTop = window.top; | ||
deviceWidth = winTop.screen.width; | ||
deviceHeight = winTop.screen.height; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This creates a performance problem
please merge in latest master as well |
@patmmccann |
* New Adapter: Oraki * added some fixes * removed logError * used lib functions to remove code duplication
Type of change
Bugfix
Feature
New bidder adapter
Updated bidder adapter
Code style update (formatting, local variables)
Refactoring (no functional changes, no api changes)
Build related changes
CI related changes
Does this change affect user-facing APIs or examples documented on http://prebid.org?
Other
DOC
prebid/prebid.github.io#5403