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

Lasso Bid Adapter: add gpp support #11256

Merged
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
13 changes: 11 additions & 2 deletions modules/lassoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export const spec = {
url: encodeURIComponent(window.location.href),
bidderRequestId: bidRequest.bidderRequestId,
adUnitCode: bidRequest.adUnitCode,
// TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
auctionId: bidRequest.auctionId,
bidId: bidRequest.bidId,
transactionId: bidRequest.ortb2Imp?.ext?.tid,
Expand All @@ -48,11 +47,20 @@ export const spec = {
params: JSON.stringify(bidRequest.params),
crumbs: JSON.stringify(bidRequest.crumbs),
prebidVersion: '$prebid.version$',
version: 3,
version: 4,
coppa: config.getConfig('coppa') == true ? 1 : 0,
ccpa: bidderRequest.uspConsent || undefined
}

if (
bidderRequest &&
bidderRequest.gppConsent &&
bidderRequest.gppConsent.gppString
) {
payload.gpp = bidderRequest.gppConsent.gppString;
payload.gppSid = bidderRequest.gppConsent.applicableSections;
}

return {
method: 'GET',
url: getBidRequestUrl(aimXR, bidRequest.params),
Expand All @@ -74,6 +82,7 @@ export const spec = {

const bidResponse = {
requestId: response.bidid,
bidId: response.bidid,
cpm: response.bid.price,
currency: response.cur,
width: response.bid.w,
Expand Down
1 change: 1 addition & 0 deletions test/spec/modules/lassoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ describe('lassoBidAdapter', function () {
it('should get the correct bid response', function () {
let expectedResponse = {
requestId: '123456789',
bidId: '123456789',
cpm: 1,
currency: 'USD',
width: 728,
Expand Down