Skip to content
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

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

kvnsw
Copy link
Contributor

@kvnsw kvnsw commented Jul 9, 2024

Type of change

  • Feature

Description of change

  • 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)

…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)
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`
Copy link
Collaborator

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.

skip: bid.mediaTypes?.[VIDEO]?.skip || 0,
skipafter: bid.mediaTypes?.[VIDEO]?.skipafter || 0,
skipmin: bid.mediaTypes?.[VIDEO]?.skipmin || 0,
startdelay: bid.mediaTypes?.[VIDEO]?.startdelay || 0,
Copy link
Collaborator

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.

deepAccess(bidderRequest, 'gdprConsent.vendorData.hasGlobalConsent') === true ||
(
deepAccess(bidderRequest, 'gdprConsent.vendorData.vendor.consents.573') === true &&
deepAccess(bidderRequest, 'gdprConsent.vendorData.purpose.consents.1') === true &&
Copy link
Collaborator

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

Copy link
Collaborator

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'))
);`

Copy link
Contributor Author

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

Copy link
Collaborator

@patmmccann patmmccann left a 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

@kvnsw kvnsw requested a review from patmmccann July 10, 2024 11:36
@patmmccann patmmccann self-assigned this Jul 10, 2024
@patmmccann patmmccann merged commit 10fcd20 into prebid:master Jul 10, 2024
6 checks passed
DecayConstant pushed a commit to mediavine/Prebid.js that referenced this pull request Jul 18, 2024
…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 <[email protected]>
Co-authored-by: Kevin Siow <[email protected]>
mefjush pushed a commit to adhese/Prebid.js that referenced this pull request Jul 19, 2024
…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 <[email protected]>
Co-authored-by: Kevin Siow <[email protected]>
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.

None yet

3 participants