Skip to content

Commit

Permalink
ZetaGlobalSsp Bid Adapter: provide tagid from params (prebid#9764)
Browse files Browse the repository at this point in the history
* ZetaGlobalSsp: provide tagid from params

* fix test

---------

Co-authored-by: Surovenko Alexey <[email protected]>
Co-authored-by: Alexey Surovenko <[email protected]>
  • Loading branch information
3 people authored and jorgeluisrocha committed May 18, 2023
1 parent 90fcee7 commit 5ce64c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/zeta_global_sspBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 8 additions & 0 deletions test/spec/modules/zeta_global_sspBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ describe('Zeta Ssp Bid Adapter', function () {
},
sid: 'publisherId',
shortname: 'test_shortname',
tagid: 'test_tag_id',
site: {
page: 'testPage'
},
Expand Down Expand Up @@ -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);
});
});

0 comments on commit 5ce64c4

Please sign in to comment.