-
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
Preciso Bid Adapter : Native included #12257
Preciso Bid Adapter : Native included #12257
Conversation
… into master_native
docs PR prebid/prebid.github.io#5582 |
modules/precisoBidAdapter.js
Outdated
onBidWon, | ||
getUserSyncs: (syncOptions, serverResponses, gdprConsent, uspConsent) => { | ||
const isSpec = syncOptions.spec; | ||
if (!Object.is(isSpec, true)) { | ||
if ((!Object.is(isSpec, true)) && (storage.localStorageIsEnabled())) { | ||
let syncId = storage.getCookie('_sharedid'); |
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 only works if the publishers sets up sharedId to use a cookie with this name; it also bypasses consent/activity control settings (granted it's an unlikely scenario, but it's possible that a publisher may decide to not make sharedId available to Preciso in particular).
You can get sharedId (when available) as bidRequest.userId.pubcid
, or as an EID with source 'pubcid.org' in userIdAsEids
.
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.
Hi @dgirardi
we are passing the sharedId to sync and prevent the unwanted bidrequests. we are passing this sharedId if it is available only, otherwise we send it as NA. even if the sharedid is there or not getuserSyncs will happen. if the sharedid is present, it will pass that otherwise it consider as NA.
Thank you!
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 publishers decide to set their sharedId to a different browser storage key or location, your bidder will not see that and provide bids. You can avoid those scenarios by looking in the locations mentioned above.
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.
Hi @ncolletti Can I get bidRequest.userId.pubcid in getUserSyncs() ?
libraries/precisoUtils/bidUtils.js
Outdated
}); | ||
return result; | ||
} else { | ||
return |
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 native bid w/o assets should be filtered out of your returned bid responses, could you add this?
libraries/precisoUtils/bidUtils.js
Outdated
native.assets.forEach(asset => { | ||
switch (asset.id) { | ||
case OPENRTB.NATIVE.ASSET_ID.TITLE: | ||
result.title = asset.title.text; |
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 use deepAccess
to set these properties
modules/precisoBidAdapter.js
Outdated
onBidWon, | ||
getUserSyncs: (syncOptions, serverResponses, gdprConsent, uspConsent) => { | ||
const isSpec = syncOptions.spec; | ||
if (!Object.is(isSpec, true)) { | ||
if ((!Object.is(isSpec, true)) && (storage.localStorageIsEnabled())) { | ||
let syncId = storage.getCookie('_sharedid'); |
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 publishers decide to set their sharedId to a different browser storage key or location, your bidder will not see that and provide bids. You can avoid those scenarios by looking in the locations mentioned above.
Tread carefully! This PR adds 1 linter error (possibly disabled through directives):
|
ASSET_ID: { | ||
TITLE: 1, | ||
IMAGE: 3, | ||
ICON: 2, |
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.
Stop reordering things to avoid duplication checks. You pr is declined.
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
Other information