Skip to content

Commit

Permalink
AppNexus 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 9c7b650
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/appnexusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import {
logError,
logInfo,
logMessage,
logWarn
logWarn,
mergeDeep
} from '../src/utils.js';
import {Renderer} from '../src/Renderer.js';
import {config} from '../src/config.js';
Expand Down Expand Up @@ -262,6 +263,12 @@ export const spec = {
payload.app = appIdObj;
}

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

// grab the ortb2 keyword data (if it exists) and convert from the comma list string format to object format
let ortb2 = deepClone(bidderRequest && bidderRequest.ortb2);

Expand Down

0 comments on commit 9c7b650

Please sign in to comment.