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

consentManagement - add support for safeframe workflow #2523

Merged
merged 1 commit into from
May 15, 2018

Conversation

jsnellbaker
Copy link
Collaborator

Type of change

  • Feature

Description of change

This PR adds support for the safeframe workflow that's described in the 1.1 CMP spec for the consentManagement module.

See link here for details from the spec.

Also added new method in utils to read the adUnits object to grab the sizes from either adUnit.mediaTypes.banner.sizes or adUnit.sizes. We use the first adUnits object's dimensions as part of the safeframe register function.

Copy link
Collaborator

@harpere harpere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question.

function callCmpWhileInSafeFrame() {
function sfCallback(msgName, data) {
if (msgName === 'cmpReturn') {
cmpSuccess(data.vendorConsents);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec uses data.VendorConsents (with a capital V). Not sure if it's a typo, or may be referring to the full VendorConsents object. should confirm this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked internally with our resident CMP developer and he indicated it should be lower-case (ie normal syntax).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool. Looks good then.

@harpere harpere self-assigned this May 11, 2018
Copy link
Collaborator

@harpere harpere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harpere harpere added needs 2nd review Core module updates require two approvals from the core team needs review and removed needs 2nd review Core module updates require two approvals from the core team needs review labels May 11, 2018
@mkendall07 mkendall07 self-assigned this May 15, 2018
Copy link
Member

@mkendall07 mkendall07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one question.

* @param {object} adUnit one adUnit object from the normal list of adUnits
* @returns {array[array[number]]} array of arrays containing numeric sizes
*/
export function getAdUnitSizes(adUnit) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason this is a new function vs reusing parseSizesInput ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that function converts the sizes into an array of strings like ["300x250"]. I just wanted the actual sizes to reassign into the register call and not have to parse it again.

@mkendall07 mkendall07 merged commit 07e711c into master May 15, 2018
ArmandChoy pushed a commit to RockYou-Ads/Prebid.js that referenced this pull request May 15, 2018
* PreBid.js/master: (79 commits)
  increment prebid version
  Prebid 1.11.0 release
  replace find reference with imported version (prebid#2542)
  GDPR - add consent information to PBS cookie_sync request (prebid#2530)
  add support for safeframe workflow and new utils method to read adunit sizes (prebid#2523)
  Smart: GDPR support (prebid#2528)
  fix getPreparedBidForAuction to look for renderer on correct bid (prebid#2505)
  PubMatic Adapter: Bug fix to read all bids from seatBid array (prebid#2520)
  Create GXOne Bid Adapter and tests for it (prebid#2540)
  Lifestreet: gdpr and consent string parameters (prebid#2537)
  -GDPR support added in media net bidder (prebid#2538)
  change AppNexus endpoint to use ORTB (prebid#2532)
  fixed bug when latitute/longitue are not provided (prebid#2533)
  added gdpr support to userSync in rubicon adapter (prebid#2531)
  Show only summary and errors (prebid#2514)
  Aardvark v1.0 (prebid#2507)
  Add 1024x768 (size_id = 53) in sizeMap (prebid#2527)
  Add new Adapter brainyBidAdapter (prebid#2458)
  OpenX Adapter: GDPR Support (prebid#2504)
  add support for latLong in rubicon adapter (prebid#2508)
  ...
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
@mkendall07 mkendall07 deleted the gdpr_safeframe branch August 17, 2018 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review needs 2nd review Core module updates require two approvals from the core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants