diff --git a/modules/quantcastBidAdapter.js b/modules/quantcastBidAdapter.js index e6f4d27bdbb..3b06e2d61c1 100644 --- a/modules/quantcastBidAdapter.js +++ b/modules/quantcastBidAdapter.js @@ -69,7 +69,7 @@ export const spec = { }); }); - const gdprConsent = bidderRequest ? bidderRequest.gdprConsent : {}; + const gdprConsent = (bidderRequest && bidderRequest.gdprConsent) ? bidderRequest.gdprConsent : {}; // Request Data Format can be found at https://wiki.corp.qc/display/adinf/QCX const requestData = { @@ -92,7 +92,8 @@ export const spec = { }, bidId: bid.bidId, gdprSignal: gdprConsent.gdprApplies ? 1 : 0, - gdprConsent: gdprConsent.consentString + gdprConsent: gdprConsent.consentString, + prebidJsVersion: '$prebid.version$' }; const data = JSON.stringify(requestData); diff --git a/test/spec/modules/quantcastBidAdapter_spec.js b/test/spec/modules/quantcastBidAdapter_spec.js index f5a7602c7ab..e6b219bcbcc 100644 --- a/test/spec/modules/quantcastBidAdapter_spec.js +++ b/test/spec/modules/quantcastBidAdapter_spec.js @@ -119,7 +119,8 @@ describe('Quantcast adapter', function () { domain }, bidId: '2f7b179d443f14', - gdprSignal: 0 + gdprSignal: 0, + prebidJsVersion: '$prebid.version$' }; expect(requests[0].data).to.equal(JSON.stringify(expectedBidRequest));