Skip to content

Commit 40f7f2b

Browse files
authored
PBS Bid Adapter: seatbid.bid.ext.prebid.meta support (#6939)
1 parent 10a2760 commit 40f7f2b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

modules/prebidServerBidAdapter/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,8 +987,9 @@ const OPEN_RTB_PROTOCOL = {
987987
bidObject.creativeId = bid.crid;
988988
if (bid.burl) { bidObject.burl = bid.burl; }
989989
bidObject.currency = (response.cur) ? response.cur : DEFAULT_S2S_CURRENCY;
990-
bidObject.meta = bidObject.meta || {};
991-
if (bid.ext && bid.ext.dchain) { bidObject.meta.dchain = utils.deepClone(bid.ext.dchain); }
990+
bidObject.meta = {};
991+
let extPrebidMeta = utils.deepAccess(bid, 'ext.prebid.meta');
992+
if (extPrebidMeta && utils.isPlainObject(extPrebidMeta)) { bidObject.meta = utils.deepClone(extPrebidMeta); }
992993
if (bid.adomain) { bidObject.meta.advertiserDomains = bid.adomain; }
993994

994995
// the OpenRTB location for "TTL" as understood by Prebid.js is "exp" (expiration).

test/spec/modules/prebidServerBidAdapter_spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,11 @@ const RESPONSE_OPENRTB = {
271271
'type': 'banner',
272272
'event': {
273273
'win': 'http://wurl.org?id=333'
274+
},
275+
'meta': {
276+
'dchain': { 'ver': '1.0', 'complete': 0, 'nodes': [ { 'asi': 'magnite.com', 'bsid': '123456789', } ] }
274277
}
275278
},
276-
'dchain': { 'ver': '1.0', 'complete': 0, 'nodes': [ { 'asi': 'magnite.com', 'bsid': '123456789', } ] },
277279
'bidder': {
278280
'appnexus': {
279281
'brand_id': 1,

0 commit comments

Comments
 (0)