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

[synacormedia] Update adapter to support Consent Management Module #5506

Merged
merged 17 commits into from
Jul 22, 2020

Conversation

coreykress
Copy link
Contributor

Type of change

  • Feature

Description of change

Modified Synacormedia bid adapter to use the Consent Management Module.

Corey Kress and others added 15 commits February 5, 2020 17:00
* commit '25c5ad3b60ffd6b4d3c645dd9bf16bbb4397a346':
  CAP-1614 - updated docs to show correct size for banner and some other small fixes
* commit 'b6dfbc9a938563c2964d30719a78cde1f15d3740':
  CAP-1636 support schain object in prebid
* commit 'c934f2d341bea0938cd5b1b75e62030ce5447117':
  CAP-1636 updated the review comments
* commit 'a26077f86598287d5c7d2f624cd3fec5b0b8d3e1':
  CAP-1849 - split up banner and video impressions to use format
* commit 'c70d8fc30e44779a8f3f78fa341ad19ad1cf5395':
  CAP-1879 - added adapter support for consent management module
@lgtm-com
Copy link

lgtm-com bot commented Jul 16, 2020

This pull request introduces 1 alert when merging cd80003 into 307ef96 - view on LGTM.com

new alerts:

  • 1 for Useless conditional

@coreykress
Copy link
Contributor Author

It looks like the failing build is due to a different adapter's (YieldOne) unit test.

Copy link
Collaborator

@smenzer smenzer left a comment

Choose a reason for hiding this comment

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

Can you please add unit tests?

Comment on lines 90 to 96
if (!openRtbBidRequest.regs) {
openRtbBidRequest.regs = {};
}
if (!openRtbBidRequest.regs.ext) {
openRtbBidRequest.regs.ext = {};
}
openRtbBidRequest.regs.ext.us_privacy = bidderRequest.uspConsent;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest using utils.deepSetValue() method instead of all the if statements here (you'll need to import utils as well)

Suggested change
if (!openRtbBidRequest.regs) {
openRtbBidRequest.regs = {};
}
if (!openRtbBidRequest.regs.ext) {
openRtbBidRequest.regs.ext = {};
}
openRtbBidRequest.regs.ext.us_privacy = bidderRequest.uspConsent;
utils.deepSetValue(openRtbBidRequest, 'regs.ext.us_privacy', bidderRequest.uspConsent);

@smenzer smenzer self-assigned this Jul 21, 2020
@lgtm-com
Copy link

lgtm-com bot commented Jul 21, 2020

This pull request introduces 1 alert when merging fa60070 into bb91d54 - view on LGTM.com

new alerts:

  • 1 for Useless conditional

@coreykress coreykress requested a review from smenzer July 21, 2020 16:48
Copy link
Collaborator

@smenzer smenzer left a comment

Choose a reason for hiding this comment

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

other than the unnecessary checks i commented on, this LGTM and I'll go ahead and merge this after you take a look and ideally remove them.

modules/synacormediaBidAdapter.js Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented Jul 21, 2020

This pull request introduces 1 alert when merging 801603e into bb91d54 - view on LGTM.com

new alerts:

  • 1 for Useless conditional

@coreykress coreykress requested a review from smenzer July 21, 2020 17:56
Copy link
Collaborator

@smenzer smenzer left a comment

Choose a reason for hiding this comment

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

LGTM

@smenzer smenzer merged commit 3b7cb37 into prebid:master Jul 22, 2020
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.

2 participants