diff --git a/modules/adrelevantisBidAdapter.js b/modules/adrelevantisBidAdapter.js index 73077241c3b..40dd0f2d875 100644 --- a/modules/adrelevantisBidAdapter.js +++ b/modules/adrelevantisBidAdapter.js @@ -445,6 +445,13 @@ function bidToTag(bid) { tag.disable_psa = true; if (bid.params.position) { tag.position = {'above': 1, 'below': 2}[bid.params.position] || 0; + } else { + let mediaTypePos = deepAccess(bid, `mediaTypes.banner.pos`) || deepAccess(bid, `mediaTypes.video.pos`); + // only support unknown, atf, and btf values for position at this time + if (mediaTypePos === 0 || mediaTypePos === 1 || mediaTypePos === 3) { + // ortb spec treats btf === 3, but our system interprets btf === 2; so converting the ortb value here for consistency + tag.position = (mediaTypePos === 3) ? 2 : mediaTypePos; + } } if (bid.params.trafficSourceCode) { tag.traffic_source_code = bid.params.trafficSourceCode; diff --git a/modules/gamoshiBidAdapter.js b/modules/gamoshiBidAdapter.js index 6b3135be355..2d97290df88 100644 --- a/modules/gamoshiBidAdapter.js +++ b/modules/gamoshiBidAdapter.js @@ -127,7 +127,7 @@ export const spec = { const imp = { id: transactionId, - instl: deepAccess(bidRequest.ortb2Imp, 'instl') === 1 || params.instl === 1 ? 1 : 0, + instl: deepAccess(bidderRequest.ortb2Imp, 'instl') === 1 || params.instl === 1 ? 1 : 0, tagid: adUnitCode, bidfloor: helper.getBidFloor(bidRequest) || 0, bidfloorcur: 'USD', @@ -143,7 +143,7 @@ export const spec = { banner: { w: sizes.length ? sizes[0][0] : 300, h: sizes.length ? sizes[0][1] : 250, - pos: params.pos || 0, + pos: deepAccess(bidderRequest, 'mediaTypes.banner.pos') || params.pos || 0, topframe: inIframe() ? 0 : 1 } }); @@ -157,7 +157,7 @@ export const spec = { const videoImp = Object.assign({}, imp, { video: { protocols: bidRequest.mediaTypes.video.protocols || params.protocols || [1, 2, 3, 4, 5, 6], - pos: params.pos || 0, + pos: deepAccess(bidRequest, 'mediaTypes.video.pos') || params.pos || 0, ext: { context: mediaTypes.video.context }, diff --git a/modules/pixfutureBidAdapter.js b/modules/pixfutureBidAdapter.js index aa2a12cc513..231ecf08782 100644 --- a/modules/pixfutureBidAdapter.js +++ b/modules/pixfutureBidAdapter.js @@ -228,6 +228,13 @@ function bidToTag(bid) { } if (bid.params.position) { tag.position = {'above': 1, 'below': 2}[bid.params.position] || 0; + } else { + let mediaTypePos = deepAccess(bid, `mediaTypes.banner.pos`) || deepAccess(bid, `mediaTypes.video.pos`); + // only support unknown, atf, and btf values for position at this time + if (mediaTypePos === 0 || mediaTypePos === 1 || mediaTypePos === 3) { + // ortb spec treats btf === 3, but our system interprets btf === 2; so converting the ortb value here for consistency + tag.position = (mediaTypePos === 3) ? 2 : mediaTypePos; + } } if (bid.params.trafficSourceCode) { tag.traffic_source_code = bid.params.trafficSourceCode; diff --git a/modules/smilewantedBidAdapter.js b/modules/smilewantedBidAdapter.js index 73bd6101670..f41874c9753 100644 --- a/modules/smilewantedBidAdapter.js +++ b/modules/smilewantedBidAdapter.js @@ -37,6 +37,11 @@ export const spec = { transactionId: bid.transactionId, timeout: config.getConfig('bidderTimeout'), bidId: bid.bidId, + /** positionType is undocumented + It is unclear what this parameter means. + If it means the same as pos in openRTB, + It should read from openRTB object + or from mediaTypes.banner.pos */ positionType: bid.params.positionType || '', prebidVersion: '$prebid.version$' }; diff --git a/modules/spotxBidAdapter.js b/modules/spotxBidAdapter.js index 2fd403058d1..d5bf685976d 100644 --- a/modules/spotxBidAdapter.js +++ b/modules/spotxBidAdapter.js @@ -194,6 +194,10 @@ export const spec = { if (getBidIdParameter('position', bid.params) != '') { spotxReq.video.ext.pos = getBidIdParameter('position', bid.params); + } else { + if (deepAccess(bid, 'mediaTypes.video.pos')) { + spotxReq.video.ext.pos = deepAccess(bid, 'mediaTypes.video.pos'); + } } if (bid.crumbs && bid.crumbs.pubcid) {