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

Ccpa legacy support for OneVideo #4648

Merged
merged 41 commits into from
Jan 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
62516db
outstream changes
Jun 27, 2019
05e333a
removing global filtet
Jun 27, 2019
054b515
reverting page
Jun 27, 2019
94cbc2d
message
Jul 2, 2019
d49e922
adapter change
Jul 3, 2019
7a43143
remove space
Jul 3, 2019
bc859b3
testcases
Jul 3, 2019
0a8a86c
testpage
Jul 3, 2019
22e4ec9
spaces for test page
Jul 3, 2019
9637b48
renderer exist case
Jul 4, 2019
0e2d31b
reverting package-lock.json
Jul 9, 2019
88ac283
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 11, 2019
d81769b
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 24, 2019
2d48e1e
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 1, 2019
63a37e3
adding schain object
Aug 2, 2019
873a2c1
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 4, 2019
7e68c35
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 7, 2019
e8c40c3
adding tagid
Aug 7, 2019
af32e45
syntaxx error fix
Aug 7, 2019
4bb7c45
video.html
Aug 7, 2019
caf81ac
space trailing
Aug 7, 2019
514f68d
space
Aug 7, 2019
5dc1086
tagid
Aug 7, 2019
606eb96
inventoryId and placement
Aug 14, 2019
4cfb6f4
rewarded video
Sep 3, 2019
e03ff33
added unit test case
Sep 5, 2019
a17b3d3
merge
Nov 14, 2019
31bd686
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 2, 2019
157b009
ccpa cahnges
Dec 9, 2019
2294643
ccpa change
Dec 9, 2019
baaf4e0
test page
Dec 9, 2019
8d62da3
test page change
Dec 9, 2019
9548ac5
test page change 2
Dec 9, 2019
97ad9d0
change the variable
Dec 9, 2019
bbbcb5e
handling the case if both GDPR and CCPA case
Dec 11, 2019
4a744c0
Merge branch 'master' into onevideo_ccpa_gdpr_support
DeepthiNeeladri Dec 11, 2019
1b65b4b
handiling both cases
Dec 11, 2019
dd673e3
Merge branch 'onevideo_ccpa_gdpr_support' of https://github.com/Deept…
Dec 11, 2019
f6bfd9c
test cases
Dec 12, 2019
1feb1dd
legacy ccpa support
Dec 19, 2019
0481546
Update oneVideoBidAdapter.js
DeepthiNeeladri Dec 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 9 additions & 11 deletions modules/oneVideoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,13 @@ function getRequestData(bid, consentData, bidRequest) {
if (bid.params.site && bid.params.site.id) {
bidData.site.id = bid.params.site.id
}
if (isConsentRequired(consentData)) {
if (isConsentRequired(consentData) || (bidRequest && bidRequest.uspConsent)) {
bidData.regs = {
ext: {
gdpr: 1
}
ext: {}
};
if (isConsentRequired(consentData)) {
bidData.regs.ext.gdpr = 1
}

if (consentData.consentString) {
bidData.user = {
Expand All @@ -242,13 +243,10 @@ function getRequestData(bid, consentData, bidRequest) {
}
};
}
}
if (bidRequest && bidRequest.uspConsent) {
bidData.regs = {
ext: {
us_privacy: bidRequest.uspConsent
}
};
// CCPA support
if (bidRequest && bidRequest.uspConsent) {
bidData.regs.ext.us_privacy = bidRequest.uspConsent
}
}

return bidData;
Expand Down
23 changes: 18 additions & 5 deletions test/spec/modules/oneVideoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ describe('OneVideoBidAdapter', function () {
});
});

describe('when GDPR applies', function () {
describe('when GDPR and uspConsent applies', function () {
beforeEach(function () {
bidderRequest = {
'gdprConsent': {
'consentString': 'test-gdpr-consent-string',
'gdprApplies': true
},
'uspConsent\'s': '1YN-',
'uspConsent': '1YN-',
'bidderCode': 'oneVideo',
'auctionId': 'e158486f-8c7f-472f-94ce-b0cbfbb50ab4',
'bidderRequestId': '1e498b84fffc39',
Expand All @@ -221,9 +221,16 @@ describe('OneVideoBidAdapter', function () {

mockConfig = {
consentManagement: {
cmpApi: 'iab',
timeout: 1111,
allowAuctionWithoutConsent: 'cancel'
gdpr: {
cmpApi: 'iab',
timeout: 3000,
allowAuctionWithoutConsent: 'cancel'
},
usp: {
cmpApi: 'iab',
timeout: 1000,
allowAuctionWithoutConsent: 'cancel'
}
}
};
});
Expand All @@ -243,6 +250,12 @@ describe('OneVideoBidAdapter', function () {
expect(request[0].data.regs.ext.us_privacy).to.equal(bidderRequest.uspConsent);
});

it('should send the uspConsent and GDPR ', function () {
const request = spec.buildRequests([ bidRequest ], bidderRequest);
expect(request[0].data.regs.ext.gdpr).to.equal(1);
expect(request[0].data.regs.ext.us_privacy).to.equal(bidderRequest.uspConsent);
});

it('should send schain object', function () {
const requests = spec.buildRequests([ bidRequest ], bidderRequest);
const data = requests[0].data;
Expand Down