Skip to content

Commit

Permalink
adds tid to source and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
allison3lift committed Jun 22, 2022
1 parent ba28444 commit 6ba3859
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/tripleliftBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export const tripleliftAdapterSpec = {
}
}

utils.deepSetValue(data, 'source.tid', bidRequests[0].auctionId);

if (bidderRequest && bidderRequest.uspConsent) {
tlCall = tryAppendQueryString(tlCall, 'us_privacy', bidderRequest.uspConsent);
}
Expand Down
6 changes: 6 additions & 0 deletions test/spec/modules/tripleliftBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,12 @@ describe('triplelift adapter', function () {
expect(payload.imp[6].banner.format).to.deep.equal([{w: 300, h: 250}, {w: 300, h: 600}]);
});

it('should include transaction id', function () {
const request = tripleliftAdapterSpec.buildRequests(bidRequests, bidderRequest);
expect(request.data.source.tid).to.exist;
expect(request.data.source.tid).and.to.deep.equal(bidRequests[0].auctionId);
});

it('should add tdid to the payload if included', function () {
const id = '6bca7f6b-a98a-46c0-be05-6020f7604598';
bidRequests[0].userId.tdid = id;
Expand Down

0 comments on commit 6ba3859

Please sign in to comment.