Skip to content

Commit

Permalink
Lasso Bid Adapter: add gpp support (prebid#11256)
Browse files Browse the repository at this point in the history
* Add gpp support and variable name update

* correct unit test
  • Loading branch information
victorlassomarketing authored and mefjush committed Apr 8, 2024
1 parent a9ea239 commit b4193ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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

0 comments on commit b4193ab

Please sign in to comment.