Skip to content

Commit

Permalink
Adds advertiserTransparency as an option.
Browse files Browse the repository at this point in the history
  • Loading branch information
antosarho committed Jun 26, 2024
1 parent 69d7906 commit b9483a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions modules/adnuntiusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ export const spec = {

const bidderConfig = config.getConfig();
if (bidderConfig.useCookie === false) queryParamsAndValues.push('noCookies=true');
if (bidderConfig.advertiserTransparency === true) queryParamsAndValues.push('advertiserTransparency=true');
if (bidderConfig.maxDeals > 0) queryParamsAndValues.push('ds=' + Math.min(bidderConfig.maxDeals, MAXIMUM_DEALS_LIMIT));

const bidRequests = {};
Expand Down
9 changes: 6 additions & 3 deletions test/spec/modules/adnuntiusBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -876,14 +876,15 @@ describe('adnuntiusBidAdapter', function () {
config.setBidderConfig({
bidders: ['adnuntius'],
config: {
useCookie: false
useCookie: false,
advertiserTransparency: true
}
});

const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidderRequests, {}));
expect(request.length).to.equal(1);
expect(request[0]).to.have.property('url')
expect(request[0].url).to.equal(ENDPOINT_URL_NOCOOKIE);
expect(request[0].url).to.equal(ENDPOINT_URL_NOCOOKIE + "&advertiserTransparency=true");
});
});

Expand Down Expand Up @@ -981,7 +982,9 @@ describe('adnuntiusBidAdapter', function () {
config.setBidderConfig({
bidders: ['adnuntius'],
config: {
maxDeals: 2
maxDeals: 2,
useCookie: 'ignore-this',
advertiserTransparency: 'ignore-this-as-well'
}
});

Expand Down

0 comments on commit b9483a2

Please sign in to comment.