Skip to content

Commit

Permalink
Sovrn Bid Adapter: Add full ORTB2 device data to request payload
Browse files Browse the repository at this point in the history
  • Loading branch information
BohdanVV committed Jun 6, 2024
1 parent f4c0b7b commit 44b765c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion modules/sovrnBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import {
logError,
deepAccess,
isInteger,
logWarn, getBidIdParameter, isEmptyStr
logWarn,
getBidIdParameter,
isEmptyStr,
mergeDeep
} from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js'
import {
Expand Down Expand Up @@ -197,6 +200,12 @@ export const spec = {
deepSetValue(sovrnBidReq, 'regs.gpp_sid', bidderRequest.gppConsent.applicableSections);
}

// if present, merge device object from ortb2 into `sovrnBidReq.device`
if (bidderRequest?.ortb2?.device) {
sovrnBidReq.device = sovrnBidReq.device || {};
mergeDeep(sovrnBidReq.device, bidderRequest.ortb2.device);
}

if (eids) {
deepSetValue(sovrnBidReq, 'user.ext.eids', eids)
if (criteoId) {
Expand Down

0 comments on commit 44b765c

Please sign in to comment.