-
Notifications
You must be signed in to change notification settings - Fork 2.2k
TRUSTX2 Bid Adapter : initial release #13044
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
Conversation
Tread carefully! This PR adds 21 linter errors and 1 linter warning (possibly disabled through directives):
|
* @typedef {import('../src/adapters/bidderFactory.js').SyncOptions} SyncOptions | ||
*/ | ||
|
||
const BIDDER_CODE = 'trustx2'; |
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.
i think this is a large mistake; you should endeavor to keep your installed base. See the newspass transition from ozone to aditude backend as an example
} | ||
}); | ||
|
||
// GDPR |
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.
whats with all the redundant uselles logic here? this is a bit of a mess. I think if you delete all the way down to line 150 something you get the same effect
} | ||
}); | ||
|
||
export const spec = { |
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.
where's your gvlid; it is kind of strange to not have one and say you are gdpr compliant.
* @return {Bid[]} An array of bids which were nested inside the server. | ||
*/ | ||
interpretResponse: function(serverResponse, bidRequest) { | ||
const userId = deepAccess(serverResponse, 'body.ext.userid'); |
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.
use optional chaining
imp(buildImp, bidRequest, context) { | ||
const impression = buildImp(bidRequest, context); | ||
|
||
if (!impression.bidfloor) { |
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.
you should call the getFloor function explicitly
|
||
if (!impression.bidfloor) { | ||
impression.bidfloor = bidRequest.params.bidfloor || 0; | ||
impression.bidfloorcur = bidRequest.params.currency || SUPPORTED_CURRENCY; |
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.
i dont think this matches what you have in your doc bidfloorcur: 'USD'
const userId = deepAccess(serverResponse, 'body.ext.userid'); | ||
if (userId && config.getConfig('localStorageWriteAllowed')) { | ||
if (storage.localStorageIsEnabled()) { | ||
storage.setDataInLocalStorage(USER_ID_KEY, userId); |
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 are you trying to achieve? the shared id does this
*/ | ||
interpretResponse: function(serverResponse, bidRequest) { | ||
const userId = deepAccess(serverResponse, 'body.ext.userid'); | ||
if (userId && config.getConfig('localStorageWriteAllowed')) { |
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.
eliminate this getconfig
} | ||
|
||
serverResponses.forEach(resp => { | ||
const userSync = deepAccess(resp, 'body.ext.usersync'); |
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.
optional chaining
return false; | ||
} | ||
|
||
const hasMediaType = containsVideoRequest(bidRequest) || hasBannerFormat(bidRequest); |
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.
it is hard to imagine this validation failing bc you listed your supported media types
function isVideoValid(bidRequest) { | ||
// If there's no video no need to validate | ||
if (!containsVideoRequest(bidRequest)) { | ||
return true; |
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 seems to stem from the strange && in the valid function above, if you change that to an || you can drop this validation; or just only call this function on video inventory
const params = deepAccess(bidRequest, 'params', {}); | ||
|
||
if (params && params.e2etest) { | ||
return true; |
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 does this test bypass validations?
...videoConfig, | ||
...videoBidParams // Bidder Specific overrides | ||
}; | ||
|
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.
isnt core doing all these vlaidations already?
Line 70 in 14d86f9
export function validateOrtbVideoFields(adUnit, onInvalidParam) { |
# Additional Configuration Options | ||
|
||
## GPP/GCC Support | ||
TRUSTX 2.0 fully supports Global Privacy Platform (GPP) and Global Cookie Consent (GCC) standards. |
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 the heck is gcc?
TRUSTX 2.0 fully supports Global Privacy Platform (GPP) and Global Cookie Consent (GCC) standards. | ||
|
||
## GDPR, CCPA and other Privacy Regulations | ||
TRUSTX 2.0 is fully compliant with GDPR, CCPA, and other global privacy regulations. |
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 kind of an odd thing to say, how do you know, do you comply with gdpr outside of its geographic scope?
Closing as stale |
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
Description of change
New Bidder Adapter
Maintainer: [email protected]
Test parameters for validating bids: