Skip to content

Commit

Permalink
Merge pull request #24 from KargoGlobal/KRKPD-619
Browse files Browse the repository at this point in the history
KRKPD-619 Adding site to Kargo adapter.
  • Loading branch information
njflynn committed Oct 5, 2023
2 parents cf27337 + 8b9f588 commit 203abca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
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

0 comments on commit 203abca

Please sign in to comment.