From 5ce64c4aeaf67655f51aac63a31057ed5c405a24 Mon Sep 17 00:00:00 2001 From: asurovenko-zeta <80847074+asurovenko-zeta@users.noreply.github.com> Date: Thu, 6 Apr 2023 13:32:38 +0200 Subject: [PATCH] ZetaGlobalSsp Bid Adapter: provide tagid from params (#9764) * ZetaGlobalSsp: provide tagid from params * fix test --------- Co-authored-by: Surovenko Alexey Co-authored-by: Alexey Surovenko --- modules/zeta_global_sspBidAdapter.js | 3 +++ test/spec/modules/zeta_global_sspBidAdapter_spec.js | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/modules/zeta_global_sspBidAdapter.js b/modules/zeta_global_sspBidAdapter.js index 2f392ccdbd3..531384b9f27 100644 --- a/modules/zeta_global_sspBidAdapter.js +++ b/modules/zeta_global_sspBidAdapter.js @@ -77,6 +77,9 @@ export const spec = { id: request.bidId, secure: secure }; + if (params.tagid) { + impData.tagid = params.tagid; + } if (request.mediaTypes) { for (const mediaType in request.mediaTypes) { switch (mediaType) { diff --git a/test/spec/modules/zeta_global_sspBidAdapter_spec.js b/test/spec/modules/zeta_global_sspBidAdapter_spec.js index 4e18f49c849..c3678427a9a 100644 --- a/test/spec/modules/zeta_global_sspBidAdapter_spec.js +++ b/test/spec/modules/zeta_global_sspBidAdapter_spec.js @@ -51,6 +51,7 @@ describe('Zeta Ssp Bid Adapter', function () { }, sid: 'publisherId', shortname: 'test_shortname', + tagid: 'test_tag_id', site: { page: 'testPage' }, @@ -396,4 +397,11 @@ describe('Zeta Ssp Bid Adapter', function () { expect(payload.source.ext.schain).to.eql(schain); }); + + it('Test tagid provided', function () { + const request = spec.buildRequests(bannerRequest, bannerRequest[0]); + const payload = JSON.parse(request.data); + + expect(payload.imp[0].tagid).to.eql(params.tagid); + }); });