Skip to content

Commit

Permalink
use bidderRequestId instead of auctionid (#10411)
Browse files Browse the repository at this point in the history
  • Loading branch information
khang-vu-ttd authored Aug 31, 2023
1 parent dbf88cb commit f6e4796
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/ttdBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';
import {isNumber} from '../src/utils.js';

const BIDADAPTERVERSION = 'TTD-PREBID-2022.06.28';
const BIDADAPTERVERSION = 'TTD-PREBID-2023.09.05';
const BIDDER_CODE = 'ttd';
const BIDDER_CODE_LONG = 'thetradedesk';
const BIDDER_ENDPOINT = 'https://direct.adsrvr.org/bid/bidder/';
Expand Down Expand Up @@ -406,7 +406,7 @@ export const spec = {
buildRequests: function (validBidRequests, bidderRequest) {
const firstPartyData = bidderRequest.ortb2 || {};
let topLevel = {
id: bidderRequest.auctionId,
id: bidderRequest.bidderRequestId,
imp: validBidRequests.map(bidRequest => getImpression(bidRequest)),
site: getSite(bidderRequest, firstPartyData),
device: getDevice(firstPartyData),
Expand Down
5 changes: 5 additions & 0 deletions test/spec/modules/ttdBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ describe('ttdBidAdapter', function () {
expect(request.data).to.be.not.null;
});

it('sets bidrequest.id to bidderRequestId', function () {
const requestBody = testBuildRequests(baseBannerBidRequests, baseBidderRequest).data;
expect(requestBody.id).to.equal('18084284054531');
});

it('sets impression id to ad unit\'s bid id', function () {
const requestBody = testBuildRequests(baseBannerBidRequests, baseBidderRequest).data;
expect(requestBody.imp[0].id).to.equal('243310435309b5');
Expand Down

0 comments on commit f6e4796

Please sign in to comment.