Skip to content

Commit

Permalink
Triplelift Bid Adapter: set networkId in response (#9545)
Browse files Browse the repository at this point in the history
* prioritize topmostlocation

* adds test for topmostlocation / referrer

* cleanup

* delete param after test

* TL-32803: Update referrer logic

* TL-32803: Update referrer logic

* TL-34204: Add support for GPP

* TL-34944: Add logic to pass networkId back in the bid response

* TL-34944: Add logic to pass networkId back in the bid response

* TL-34944: Add logic to pass networkId back in the bid response

* few more tests

---------

Co-authored-by: Nick Llerandi <nllerandi@triplelift.com>
Co-authored-by: nllerandi3lift <75995508+nllerandi3lift@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 15, 2023
1 parent 7b2fdd5 commit 623b88e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/tripleliftBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,10 @@ function _buildResponseObject(bidderRequest, bid) {
if (bid.tl_source && bid.tl_source == 'tlx') {
bidResponse.meta.mediaType = 'native';
}

if (creativeId) {
bidResponse.meta.networkId = creativeId.slice(0, creativeId.indexOf('_'));
}
};
return bidResponse;
}
Expand Down
7 changes: 7 additions & 0 deletions test/spec/modules/tripleliftBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1437,6 +1437,13 @@ describe('triplelift adapter', function () {
expect(result[0].meta.advertiserDomains[1]).to.equal('internetalerts.org');
expect(result[1].meta).to.not.have.key('advertiserDomains');
});

it('should include networkId in the meta field if available', function () {
let result = tripleliftAdapterSpec.interpretResponse(response, {bidderRequest});
expect(result[1].meta.networkId).to.equal('10092');
expect(result[2].meta.networkId).to.equal('5989');
expect(result[3].meta.networkId).to.equal('5989');
});
});

describe('getUserSyncs', function() {
Expand Down

0 comments on commit 623b88e

Please sign in to comment.