diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js index 7e8bd3ad288..f125d88c80c 100644 --- a/modules/oneVideoBidAdapter.js +++ b/modules/oneVideoBidAdapter.js @@ -243,6 +243,13 @@ function getRequestData(bid, consentData, bidRequest) { }; } } + if (bidRequest && bidRequest.uspConsent) { + bidData.regs = { + ext: { + us_privacy: bidRequest.uspConsent + } + }; + } return bidData; } diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js index d46bba038b2..3d21601387b 100644 --- a/test/spec/modules/oneVideoBidAdapter_spec.js +++ b/test/spec/modules/oneVideoBidAdapter_spec.js @@ -203,6 +203,7 @@ describe('OneVideoBidAdapter', function () { 'consentString': 'test-gdpr-consent-string', 'gdprApplies': true }, + 'uspConsent\'s': '1YN-', 'bidderCode': 'oneVideo', 'auctionId': 'e158486f-8c7f-472f-94ce-b0cbfbb50ab4', 'bidderRequestId': '1e498b84fffc39', @@ -237,6 +238,11 @@ describe('OneVideoBidAdapter', function () { expect(request[0].data.user.ext.consent).to.equal(bidderRequest.gdprConsent.consentString); }); + it('should send the uspConsent string', function () { + const request = spec.buildRequests([ bidRequest ], bidderRequest); + 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;