Skip to content

Commit

Permalink
Triplelift Bid Adapter: Support for GPP in bid requests (prebid#9455)
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

Co-authored-by: Nick Llerandi <[email protected]>
Co-authored-by: nllerandi3lift <[email protected]>
  • Loading branch information
3 people authored and JacobKlein26 committed Feb 8, 2023
1 parent a50b02e commit b2bb99e
Show file tree
Hide file tree
Showing 2 changed files with 17 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 @@ -154,6 +154,10 @@ function _buildPostBody(bidRequests, bidderRequest) {
if (!isEmpty(ext)) {
data.ext = ext;
}

if (bidderRequest?.ortb2?.regs?.gpp) {
data.regs = Object.assign({}, bidderRequest.ortb2.regs);
}
return data;
}

Expand Down
13 changes: 13 additions & 0 deletions test/spec/modules/tripleliftBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,19 @@ describe('triplelift adapter', function () {
}
})
});
it('should add gpp consent data to bid request object if gpp data exists', function() {
bidderRequest.ortb2 = {
regs: {
'gpp': 'BOJ/P2HOJ/P2HABABMAAAAAZ+A==',
'gpp_sid': [7]
}
}
const request = tripleliftAdapterSpec.buildRequests(bidRequests, bidderRequest);
expect(request.data.regs).to.deep.equal({
'gpp': 'BOJ/P2HOJ/P2HABABMAAAAAZ+A==',
'gpp_sid': [7]
})
});
});

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

0 comments on commit b2bb99e

Please sign in to comment.