diff --git a/modules/zeta_global_sspBidAdapter.js b/modules/zeta_global_sspBidAdapter.js index 1ed35792285..2f392ccdbd3 100644 --- a/modules/zeta_global_sspBidAdapter.js +++ b/modules/zeta_global_sspBidAdapter.js @@ -146,6 +146,15 @@ export const spec = { deepSetValue(payload, 'regs.ext.us_privacy', bidderRequest.uspConsent); } + // schain + if (validBidRequests[0].schain) { + payload.source = { + ext: { + schain: validBidRequests[0].schain + } + } + } + if (bidderRequest?.timeout) { payload.tmax = bidderRequest.timeout; } diff --git a/test/spec/modules/zeta_global_sspBidAdapter_spec.js b/test/spec/modules/zeta_global_sspBidAdapter_spec.js index 3cec0d79fcb..4e18f49c849 100644 --- a/test/spec/modules/zeta_global_sspBidAdapter_spec.js +++ b/test/spec/modules/zeta_global_sspBidAdapter_spec.js @@ -25,6 +25,22 @@ describe('Zeta Ssp Bid Adapter', function () { } ]; + const schain = { + complete: 1, + nodes: [ + { + asi: 'asi1', + sid: 'sid1', + rid: 'rid1' + }, + { + asi: 'asi2', + sid: 'sid2', + rid: 'rid2' + } + ] + }; + const params = { user: { uid: 222, @@ -103,6 +119,7 @@ describe('Zeta Ssp Bid Adapter', function () { gdprApplies: 1, consentString: 'consentString' }, + schain: schain, uspConsent: 'someCCPAString', params: params, userIdAsEids: eids, @@ -372,4 +389,11 @@ describe('Zeta Ssp Bid Adapter', function () { expect(spec.onTimeout).to.exist.and.to.be.a('function'); expect(spec.onTimeout({ timeout: 1000 })).to.be.undefined; }); + + it('Test schain provided', function () { + const request = spec.buildRequests(bannerRequest, bannerRequest[0]); + const payload = JSON.parse(request.data); + + expect(payload.source.ext.schain).to.eql(schain); + }); });