Skip to content

Commit

Permalink
Merge pull request #79 from triplelift-internal/TL-36484-Fledge-Signals
Browse files Browse the repository at this point in the history
TL-36484: Add fledge signaling
  • Loading branch information
nllerandi3lift authored Jun 22, 2023
2 parents b94285d + b7e1713 commit 0e76a07
Show file tree
Hide file tree
Showing 2 changed files with 10 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 @@ -56,6 +56,10 @@ export const tripleliftAdapterSpec = {
tlCall = tryAppendQueryString(tlCall, 'us_privacy', bidderRequest.uspConsent);
}

if (bidderRequest && bidderRequest.fledgeEnabled) {
tlCall = tryAppendQueryString(tlCall, 'fledge', bidderRequest.fledgeEnabled);
}

if (config.getConfig('coppa') === true) {
tlCall = tryAppendQueryString(tlCall, 'coppa', true);
}
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 @@ -1039,6 +1039,12 @@ describe('triplelift adapter', function () {
const url = request.url;
expect(url).to.match(/(\?|&)us_privacy=1YYY/);
});
it('should pass fledge signal when Triplelift is eligible for fledge', function() {
bidderRequest.fledgeEnabled = true;
const request = tripleliftAdapterSpec.buildRequests(bidRequests, bidderRequest);
const url = request.url;
expect(url).to.match(/(\?|&)fledge=true/);
});
it('should return coppa param when COPPA config is set to true', function() {
sinon.stub(config, 'getConfig').withArgs('coppa').returns(true);
const request = tripleliftAdapterSpec.buildRequests(bidRequests, bidderRequest);
Expand Down

0 comments on commit 0e76a07

Please sign in to comment.