Skip to content

Commit

Permalink
Merge pull request #66 from triplelift-internal/TL-34204-GPP-Feature
Browse files Browse the repository at this point in the history
TL-34204: Add support for GPP
  • Loading branch information
patrickloughrey authored Jan 24, 2023
2 parents f361ed2 + f0e8f63 commit 26fe5f5
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 26fe5f5

Please sign in to comment.