From 49c25c53e9a3b02f3f78216fa428543d7aa84174 Mon Sep 17 00:00:00 2001 From: "Jacek.Burys" Date: Thu, 25 Oct 2018 13:06:41 +0100 Subject: [PATCH 1/2] adding Prebid.js version to request in quantcastBidAdapter --- modules/quantcastBidAdapter.js | 5 +++-- test/spec/modules/quantcastBidAdapter_spec.js | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/quantcastBidAdapter.js b/modules/quantcastBidAdapter.js index e6f4d27bdbb..68678fa33e4 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: pbjs.version }; const data = JSON.stringify(requestData); diff --git a/test/spec/modules/quantcastBidAdapter_spec.js b/test/spec/modules/quantcastBidAdapter_spec.js index f5a7602c7ab..709b386e0a9 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: pbjs.version }; expect(requests[0].data).to.equal(JSON.stringify(expectedBidRequest)); From 97c88b9bad0b0509fd8603d5b47f60f0b6e85ec0 Mon Sep 17 00:00:00 2001 From: "Jacek.Burys" Date: Fri, 26 Oct 2018 11:35:45 +0100 Subject: [PATCH 2/2] using .version$ instead of pbjs.version --- modules/quantcastBidAdapter.js | 2 +- test/spec/modules/quantcastBidAdapter_spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/quantcastBidAdapter.js b/modules/quantcastBidAdapter.js index 68678fa33e4..3b06e2d61c1 100644 --- a/modules/quantcastBidAdapter.js +++ b/modules/quantcastBidAdapter.js @@ -93,7 +93,7 @@ export const spec = { bidId: bid.bidId, gdprSignal: gdprConsent.gdprApplies ? 1 : 0, gdprConsent: gdprConsent.consentString, - prebidJsVersion: pbjs.version + 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 709b386e0a9..e6b219bcbcc 100644 --- a/test/spec/modules/quantcastBidAdapter_spec.js +++ b/test/spec/modules/quantcastBidAdapter_spec.js @@ -120,7 +120,7 @@ describe('Quantcast adapter', function () { }, bidId: '2f7b179d443f14', gdprSignal: 0, - prebidJsVersion: pbjs.version + prebidJsVersion: '$prebid.version$' }; expect(requests[0].data).to.equal(JSON.stringify(expectedBidRequest));