diff --git a/modules/jixieBidAdapter.js b/modules/jixieBidAdapter.js index 67895347e7..d482d038c3 100644 --- a/modules/jixieBidAdapter.js +++ b/modules/jixieBidAdapter.js @@ -217,6 +217,10 @@ export const spec = { if (eids1 && eids1.length) { eids = eids1; } + + const siteKvs = deepAccess(bidderRequest, 'ortb2.site.ext.data.jixie'); + const userKvs = deepAccess(bidderRequest, 'ortb2.user.ext.data.jixie'); + // we want to send this blob of info to our backend: const transformedParams = Object.assign({}, { // TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781 @@ -237,6 +241,12 @@ export const spec = { pbjsver: PREBID_VERSION, cfg: jxCfg }, ids); + if (siteKvs) { + transformedParams.siteKvs = siteKvs; + } + if (userKvs) { + transformedParams.userKvs = userKvs; + } return Object.assign({}, { method: 'POST', url: REQUESTS_URL, diff --git a/test/spec/modules/jixieBidAdapter_spec.js b/test/spec/modules/jixieBidAdapter_spec.js index fb904e4b12..1c02f60e18 100644 --- a/test/spec/modules/jixieBidAdapter_spec.js +++ b/test/spec/modules/jixieBidAdapter_spec.js @@ -91,7 +91,27 @@ describe('jixie Adapter', function () { const bidderRequest_ = { refererInfo: { referer: pageurl_ }, auctionId: auctionId_, - timeout: timeout_ + timeout: timeout_, + ortb2: { + site: { + ext: { + data: { + jixie: { + keyA: 'abcde' + } + } + } + }, + user: { + ext: { + data: { + jixie: { + abc: 'def' + } + } + } + } + } }; // to serve as the object that prebid will call jixie buildRequest with: (param1) const bidRequests_ = [ @@ -307,6 +327,8 @@ describe('jixie Adapter', function () { expect(payload).to.have.property('timeout', timeout_); expect(payload).to.have.property('currency', currency_); expect(payload).to.have.property('bids').that.deep.equals(refBids_); + expect(payload).to.have.property('siteKvs').that.deep.equals(bidderRequest_.ortb2.site.ext.data.jixie); + expect(payload).to.have.property('userKvs').that.deep.equals(bidderRequest_.ortb2.user.ext.data.jixie); // unwire interceptors getCookieStub.restore(); diff --git a/test/spec/modules/jixieIdSystem_spec.js b/test/spec/modules/jixieIdSystem_spec.js index eb95b59b02..50c608fd3d 100644 --- a/test/spec/modules/jixieIdSystem_spec.js +++ b/test/spec/modules/jixieIdSystem_spec.js @@ -25,7 +25,6 @@ describe('JixieId Submodule', () => { const EID_TYPE2_LSNAME = 'somesha2ls'; const EID_TYPE1_SAMPLEVALUE = 'pppppppppp'; const EID_TYPE2_SAMPLEVALUE = 'eeeeeeeeee'; - it('should have the correct module name declared', () => { expect(jixieIdSubmodule.name).to.equal('jixieId'); }); @@ -41,7 +40,6 @@ describe('JixieId Submodule', () => { }); }); }); - describe('getId()', () => { describe('getId', () => { context('when there is jixie_o in the window object (jx script on site)', () => {