Skip to content

Commit

Permalink
Re-add x-integration-type to TTD adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-gielow-ttd committed Feb 27, 2025
1 parent 473093f commit f3ef9a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/ttdBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { getConnectionType } from '../libraries/connectionInfo/connectionUtils.j
* @typedef {import('../src/adapters/bidderFactory.js').UserSync} UserSync
*/

const BIDADAPTERVERSION = 'TTD-PREBID-2024.07.27';
const BIDADAPTERVERSION = 'TTD-PREBID-2024.07.28';
const BIDDER_CODE = 'ttd';
const BIDDER_CODE_LONG = 'thetradedesk';
const BIDDER_ENDPOINT = 'https://direct.adsrvr.org/bid/bidder/';
Expand Down Expand Up @@ -441,6 +441,9 @@ export const spec = {
data: topLevel,
options: {
withCredentials: true,
customHeaders: {
'x-integration-type': 1,
},
}
};

Expand Down
7 changes: 7 additions & 0 deletions test/spec/modules/ttdBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,13 @@ describe('ttdBidAdapter', function () {
expect(requestBody.site.publisher.id).to.equal(baseBannerBidRequests[0].params.publisherId);
});

it('sends integration type header', function () {
const requestBody = testBuildRequests(baseBannerBidRequests, baseBidderRequest);
expect(requestBody.options).to.be.not.null;
expect(requestBody.options.customHeaders).to.be.not.null;
expect(requestBody.options.customHeaders['x-integration-type']).to.equal(1);
});

it('sends placement id in tagid', function () {
const requestBody = testBuildRequests(baseBannerBidRequests, baseBidderRequest).data;
expect(requestBody.imp[0].tagid).to.equal(baseBannerBidRequests[0].params.placementId);
Expand Down

0 comments on commit f3ef9a5

Please sign in to comment.