-
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
Dailymotion Bid Adapter: add consent enforcement to read the advertising cookie #11950
Conversation
…ing cookie * [x] Feature * Add consent enforcement before reading the advertising cookie * If Dailymotion does not have consent from the user, it does not transmit any cookie in the request to the Prebid server (previously the cookie was sent but not used)
modules/dailymotionBidAdapter.js
Outdated
minduration: bid.mediaTypes?.[VIDEO]?.minduration || 0, | ||
maxduration: bid.mediaTypes?.[VIDEO]?.maxduration || 0, | ||
playbackmethod: bid.mediaTypes?.[VIDEO]?.playbackmethod || [], | ||
plcmt: bid.mediaTypes?.[VIDEO]?.plcmt || 1, // Fallback to instream considering logic of `isBidRequestValid` |
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 not appropriate to fill this in with a fallback to instream; instream must be declared by the publisher. You're putting their inventory at risk for getting banned by DSPs for incorrect declarations.
modules/dailymotionBidAdapter.js
Outdated
skip: bid.mediaTypes?.[VIDEO]?.skip || 0, | ||
skipafter: bid.mediaTypes?.[VIDEO]?.skipafter || 0, | ||
skipmin: bid.mediaTypes?.[VIDEO]?.skipmin || 0, | ||
startdelay: bid.mediaTypes?.[VIDEO]?.startdelay || 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.
It is not appropriate to fill this in with a fallback; preroll must be declared by the publisher. You're putting their inventory at risk for getting banned by DSPs for incorrect declarations.
modules/dailymotionBidAdapter.js
Outdated
deepAccess(bidderRequest, 'gdprConsent.vendorData.hasGlobalConsent') === true || | ||
( | ||
deepAccess(bidderRequest, 'gdprConsent.vendorData.vendor.consents.573') === true && | ||
deepAccess(bidderRequest, 'gdprConsent.vendorData.purpose.consents.1') === 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.
surely there is a more compact way to code this
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.
maybe something like this
`const li = 'legitimateInterests';
const c = 'consents';
const hasConsent = (type, path) => deepAccess(bidderRequest.gdprConsent.vendorData.purpose[type], path) === true;
const allowCookieReading =
// No GDPR applies
!deepAccess(bidderRequest, 'gdprConsent.gdprApplies') ||
// OR GDPR applies and we have global consent
deepAccess(bidderRequest, 'gdprConsent.vendorData.hasGlobalConsent') === true ||
// OR specific consents are given
(
deepAccess(bidderRequest, 'gdprConsent.vendorData.vendor.consents.573') === true &&
hasConsent(c, '1') &&
hasConsent(c, '3') &&
hasConsent(c, '4') &&
// emulate flexible purpose by checking if the default consent or legitimate interest is set
(hasConsent(c, '2') || hasConsent(li, '2')) &&
(hasConsent(c, '7') || hasConsent(li, '7')) &&
(hasConsent(c, '9') || hasConsent(li, '9')) &&
(hasConsent(c, '10') || hasConsent(li, '10'))
);`
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.
Done! Let me know what you think about this new proposal
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 minor changes
…ing cookie (prebid#11950) * Dailymotion Bid Adapter: add consent enforcement to read the advertising cookie * [x] Feature * Add consent enforcement before reading the advertising cookie * If Dailymotion does not have consent from the user, it does not transmit any cookie in the request to the Prebid server (previously the cookie was sent but not used) * Dailymotion Bid Adapter: no fallback for startdelay and plcmt * Dailymotion Bid Adapter: more concise cookie enforcement --------- Co-authored-by: Sébastien Millet <sebastien.millet@dailymotion.com> Co-authored-by: Kevin Siow <kevin.siow@dailymotion.com>
…ing cookie (prebid#11950) * Dailymotion Bid Adapter: add consent enforcement to read the advertising cookie * [x] Feature * Add consent enforcement before reading the advertising cookie * If Dailymotion does not have consent from the user, it does not transmit any cookie in the request to the Prebid server (previously the cookie was sent but not used) * Dailymotion Bid Adapter: no fallback for startdelay and plcmt * Dailymotion Bid Adapter: more concise cookie enforcement --------- Co-authored-by: Sébastien Millet <sebastien.millet@dailymotion.com> Co-authored-by: Kevin Siow <kevin.siow@dailymotion.com>
Type of change
Description of change