Skip to content

Commit 1a40e59

Browse files
njflynnjsadwithjuliangan07
authored
Kargo Bid Adapter: adding site to Kargo adapter (#10589)
* KargoBidAdapter: GPP Support * kargo adapter to forward schain object (#21) * wrap in if statement (#22) * KRKPD-572: Add spec for schain (#23) * wrap in if statement * update test for schain, file formatting * Adding site to Kargo adapter. * KRKPD-619 Updating Site object. * KRKPD-619 Adding null check for Site object. * Update modules/kargoBidAdapter.js Co-authored-by: Julian Gan <[email protected]> * Reducing the size of Site object. * remove white space that is causing linting error --------- Co-authored-by: Jeremy Sadwith <[email protected]> Co-authored-by: Julian Gan <[email protected]>
1 parent c4bf6ae commit 1a40e59

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

modules/kargoBidAdapter.js

+6
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ function buildRequests(validBidRequests, bidderRequest) {
9797
user: getUserIds(tdidAdapter, bidderRequest.uspConsent, bidderRequest.gdprConsent, firstBidRequest.userIdAsEids, bidderRequest.gppConsent),
9898
});
9999

100+
if (firstBidRequest.ortb2 != null) {
101+
krakenParams.site = {
102+
cat: firstBidRequest.ortb2.site.cat
103+
}
104+
}
105+
100106
if (firstBidRequest.schain && firstBidRequest.schain.nodes) {
101107
krakenParams.schain = firstBidRequest.schain
102108
}

test/spec/modules/kargoBidAdapter_spec.js

+8
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ describe('kargo adapter tests', function () {
142142
model: 'model',
143143
source: 1,
144144
}
145+
},
146+
site: {
147+
id: '1234',
148+
name: 'SiteName',
149+
cat: ['IAB1', 'IAB2', 'IAB3']
145150
}
146151
},
147152
ortb2Imp: {
@@ -439,6 +444,9 @@ describe('kargo adapter tests', function () {
439444
source: 1
440445
},
441446
},
447+
site: {
448+
cat: ['IAB1', 'IAB2', 'IAB3']
449+
},
442450
imp: [
443451
{
444452
code: '101',

0 commit comments

Comments
 (0)