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

Districtm DMX adapter support for CCPA #4560

Merged
merged 36 commits into from
Dec 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5711b57
adding DMX
Nov 17, 2016
ad33b56
Update districtm_spec.js
stevealliance Nov 30, 2016
fbd31ff
Update districtmDMX.js
stevealliance Nov 30, 2016
fe94313
updating repo fork in github
Oct 26, 2017
6054a04
Merge pull request #1 from prebid/master
stevealliance Jun 22, 2018
0384c75
adding all districtm needed file
Jun 22, 2018
d2f5de2
remove legacy file
Jun 22, 2018
d83db11
remove typo || 0 in the test method
Jun 22, 2018
a7d0a85
force default to return a valid width and height
Jun 27, 2018
d73cac7
update unit test code for failing test
Jun 27, 2018
d5b2617
changed class for an object
Jul 9, 2018
c80b0df
remove package-lock.json
Jul 9, 2018
afa5d3e
change file name for dmx adapter
Jul 11, 2018
4e93b06
remove package-lock.json
Jul 11, 2018
afdbd9e
update fork
Jul 31, 2018
5cc3181
renamed files
Jul 31, 2018
e3e864d
restaure package-lock.json
Jul 31, 2018
6af65f9
update to last package-lock state
Jul 31, 2018
4da8f60
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 14, 2018
15954f2
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 27, 2018
af73067
update gdpr user consent
Aug 27, 2018
c2e2f5f
fix sizes issue
Aug 27, 2018
0f83dab
Documentation updates
lsv1 Aug 29, 2018
787e1e0
Merge pull request #3 from lsv1/patch-1
stevealliance Aug 29, 2018
a63b92b
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 4, 2018
3dfb282
update file name and update unit testing import file location
Sep 4, 2018
5786375
Merge branch 'master' of https://github.com/stevealliance/Prebid.js
Sep 4, 2018
60f693e
update remote to reflect forked repo
Jun 17, 2019
1f03347
Mdding all file to localserge branch 'master' of github.com:prebid/Pr…
Oct 23, 2019
a3d85d7
current machine state
Oct 23, 2019
a327932
lint correction
Oct 23, 2019
1706bd1
remove variable assigment duplicate
Oct 23, 2019
9492b32
adding change to dmx
steve-a-districtm Nov 6, 2019
5660324
Merge pull request #4 from prebid/master
stevealliance Dec 9, 2019
f006e29
adding CCPA support for DMX
steve-a-districtm Dec 9, 2019
c6b689b
adding test for ccpa and gdpr
steve-a-districtm Dec 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions modules/districtmDMXBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ export const spec = {
dmxRequest.user.ext = {};
dmxRequest.user.ext.consent = bidderRequest.gdprConsent.consentString;
}
if (bidderRequest && bidderRequest.uspConsent) {
dmxRequest.regs = dmxRequest.regs || {};
dmxRequest.regs.ext = dmxRequest.regs.ext || {};
dmxRequest.regs.ext.us_privacy = bidderRequest.uspConsent;
}
try {
schain = bidRequest[0].schain;
dmxRequest.source = {};
Expand Down
7 changes: 7 additions & 0 deletions test/spec/modules/districtmDmxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const bidderRequest = {
}],
'auctionStart': 1529511035677,
'timeout': 700,
'uspConsent': '1NY',
'gdprConsent': {
'consentString': 'BOPqNzUOPqNzUAHABBAAA5AAAAAAAA',
'vendorData': {
Expand Down Expand Up @@ -524,6 +525,12 @@ describe('DistrictM Adaptor', function () {
it(`the function should return an array`, function () {
expect(buildRequestResults).to.be.an('object');
});
it(`contain gdpr consent & ccpa`, function() {
const bidr = JSON.parse(buildRequestResults.data)
expect(bidr.regs.ext.gdpr).to.be.equal(1);
expect(bidr.regs.ext.us_privacy).to.be.equal('1NY');
expect(bidr.user.ext.consent).to.be.an('string');
});
it(`the function should return array length of 1`, function () {
expect(buildRequestResults.data).to.be.a('string');
});
Expand Down