Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TL-34204: Add support for GPP #66

Merged
merged 1 commit into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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