Skip to content

Commit

Permalink
Kargo Bid Adapter: adding site to Kargo adapter (prebid#10589)
Browse files Browse the repository at this point in the history
* 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  <juliangan07@gmail.com>

* Reducing the size of Site object.

* remove white space that is causing linting error

---------

Co-authored-by: Jeremy Sadwith <jeremy@kargo.com>
Co-authored-by: Julian Gan <juliangan07@gmail.com>
  • Loading branch information
3 people authored Oct 10, 2023
1 parent c4bf6ae commit 1a40e59
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 1a40e59

Please sign in to comment.