Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

KRKPD-619 Adding site to Kargo adapter. #24

Merged
merged 6 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/kargoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ function buildRequests(validBidRequests, bidderRequest) {
},
imp: impressions,
user: getUserIds(tdidAdapter, bidderRequest.uspConsent, bidderRequest.gdprConsent, firstBidRequest.userIdAsEids, bidderRequest.gppConsent),
site: firstBidRequest.ortb2.site

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need to add null checks for ortb2:

select
count(time_id_utc) as total
from stage_kraken_bid_request e
where time_id_utc = 2023100310
and e.src:data:body:bidRequest:prebidRawBidRequests[0] is not null
and e.src:data:body:bidRequest:prebidRawBidRequests[0]:ortb2 is null;

---------------------------------------------

TOTAL
33,079
select
count(time_id_utc) as total
from stage_kraken_bid_request e
where time_id_utc = 2023100310
and e.src:data:body:bidRequest:prebidRawBidRequests[0]:ortb2 is not null
and e.src:data:body:bidRequest:prebidRawBidRequests[0]:ortb2:site is null;

------------------------------------------------

TOTAL
0

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

});

if (firstBidRequest.schain && firstBidRequest.schain.nodes) {
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,10 @@ describe('kargo adapter tests', function () {
model: 'model',
source: 1,
}
},
site: {
jsadwith marked this conversation as resolved.
Show resolved Hide resolved
id: '1234',
name: 'SiteName'
}
},
ortb2Imp: {
Expand Down Expand Up @@ -439,6 +443,10 @@ describe('kargo adapter tests', function () {
source: 1
},
},
site: {
id: '1234',
name: 'SiteName'
},
imp: [
{
code: '101',
Expand Down