Skip to content
New issue

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

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

Already on GitHub? # to your account

Kargo Bid Adapter: adding site to Kargo adapter #10589

Merged
merged 15 commits into from
Oct 10, 2023
Merged
6 changes: 6 additions & 0 deletions modules/kargoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ function buildRequests(validBidRequests, bidderRequest) {
user: getUserIds(tdidAdapter, bidderRequest.uspConsent, bidderRequest.gdprConsent, firstBidRequest.userIdAsEids, bidderRequest.gppConsent),
});

if (firstBidRequest.ortb2 != null) {
krakenParams.site = {
cat: firstBidRequest.ortb2.site.cat
}
}

if (firstBidRequest.schain && firstBidRequest.schain.nodes) {
krakenParams.schain = firstBidRequest.schain
}
Expand Down
8 changes: 8 additions & 0 deletions test/spec/modules/kargoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ describe('kargo adapter tests', function () {
model: 'model',
source: 1,
}
},
site: {
id: '1234',
name: 'SiteName',
cat: ['IAB1', 'IAB2', 'IAB3']
}
},
ortb2Imp: {
Expand Down Expand Up @@ -439,6 +444,9 @@ describe('kargo adapter tests', function () {
source: 1
},
},
site: {
cat: ['IAB1', 'IAB2', 'IAB3']
},
imp: [
{
code: '101',
Expand Down