Skip to content

Commit 60b6ada

Browse files
authored
OpenX Bid Adapter: add ortb2Imp to PAAPI auctionSignals (#11012)
* OpenX Bid Adapter: add ortb2Imp to PAAPI auctionSignals * Use imp instead of searching ortbRequest
1 parent d53dae2 commit 60b6ada

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

modules/openxBidAdapter.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,11 @@ const converter = ortbConverter({
107107
fledgeAuctionConfigs = Object.entries(fledgeAuctionConfigs).map(([bidId, cfg]) => {
108108
return {
109109
bidId,
110-
config: Object.assign({
111-
auctionSignals: {},
112-
}, cfg)
110+
config: mergeDeep(Object.assign({}, cfg), {
111+
auctionSignals: {
112+
ortb2Imp: context.impContext[bidId]?.imp,
113+
},
114+
}),
113115
}
114116
});
115117
return {

test/spec/modules/openxBidAdapter_spec.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,6 +1508,25 @@ describe('OpenxRtbAdapter', function () {
15081508
expect(response.fledgeAuctionConfigs.length).to.equal(1);
15091509
expect(response.fledgeAuctionConfigs[0].bidId).to.equal('test-bid-id');
15101510
});
1511+
1512+
it('should inject ortb2Imp in auctionSignals', function () {
1513+
const auctionConfig = response.fledgeAuctionConfigs[0].config;
1514+
expect(auctionConfig).to.deep.include({
1515+
auctionSignals: {
1516+
ortb2Imp: {
1517+
id: 'test-bid-id',
1518+
tagid: '12345678',
1519+
banner: {
1520+
topframe: 0,
1521+
format: bidRequestConfigs[0].mediaTypes.banner.sizes.map(([w, h]) => ({w, h}))
1522+
},
1523+
ext: {
1524+
divid: 'adunit-code',
1525+
}
1526+
}
1527+
}
1528+
});
1529+
})
15111530
});
15121531
});
15131532

0 commit comments

Comments
 (0)