From bb9be09c96a6bc204712b5f38391aa08ba2475ed Mon Sep 17 00:00:00 2001 From: BaronJHYu <254878848@qq.com> Date: Tue, 7 Nov 2023 04:30:01 +0800 Subject: [PATCH] Mediago Bid Adapter: add imp params for analysis (#10691) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Mediago Bid Adapter:new adapter * remove console * change spec file to fix CircleCI * change spec file to fix CircleCI * change spec file * Update mediagoBidAdapter.js * Update mediagoBidAdapter.js * rerun CurcleCi * update mediagoBidAdapter * update discoveryBidAdapter * Discovery Bid Adapter : parameter updates * Mediago Bid Adapter : parameter updates * Mediago Bid Adapter : code style format * rerun circleci * rerun circleci * rerun circleci * rerun circleci * Update mediagoBidAdapter & discoveryBidAdapter:report eids to server * Update mediagoBidAdapter & discoveryBidAdapter:report eids to server * update Mediago & Discovery BidAdapter:remove size filter * update Mediago & Discovery BidAdapter:code format * update Mediago & Discovery BidAdapter:code format * update Mediago & Discovery BidAdapter:add param in banner format * update mediago & discovery:first party data * update mediago & discovery:first party data * update mediago & discovery:first party data * fix(mediago & discovery): update param tagid * fix(mediago & discovery): update param tagid * feat:add imp params for analysis * fix:add imp params for analysis * code format * test:add test data & test * format code * rerun circleci --------- Co-authored-by: BaronYu --- modules/mediagoBidAdapter.js | 11 ++++---- test/spec/modules/mediagoBidAdapter_spec.js | 29 +++++++++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/modules/mediagoBidAdapter.js b/modules/mediagoBidAdapter.js index 756e636572d..efd730acace 100644 --- a/modules/mediagoBidAdapter.js +++ b/modules/mediagoBidAdapter.js @@ -221,10 +221,10 @@ function getItems(validBidRequests, bidderRequest) { } const bidFloor = getBidFloor(req); - // const gpid = - // utils.deepAccess(req, 'ortb2Imp.ext.gpid') || - // utils.deepAccess(req, 'ortb2Imp.ext.data.pbadslot') || - // utils.deepAccess(req, 'params.placementId', 0); + const gpid = + utils.deepAccess(req, 'ortb2Imp.ext.gpid') || + utils.deepAccess(req, 'ortb2Imp.ext.data.pbadslot') || + utils.deepAccess(req, 'params.placementId', 0); // if (mediaTypes.native) {} // banner广告类型 @@ -240,7 +240,8 @@ function getItems(validBidRequests, bidderRequest) { format: sizes, }, ext: { - // gpid: gpid, // 加入后无法返回广告 + ortb2Imp: utils.deepAccess(req, 'ortb2Imp'), // 传入完整对象,分析日志数据 + gpid: gpid, // 加入后无法返回广告 }, tagid: req.params && req.params.tagid, }; diff --git a/test/spec/modules/mediagoBidAdapter_spec.js b/test/spec/modules/mediagoBidAdapter_spec.js index e77af544429..5eb362893e3 100644 --- a/test/spec/modules/mediagoBidAdapter_spec.js +++ b/test/spec/modules/mediagoBidAdapter_spec.js @@ -11,11 +11,40 @@ describe('mediago:BidAdapterTests', function () { bidder: 'mediago', params: { token: '85a6b01e41ac36d49744fad726e3655d', + siteId: 'siteId_01', + zoneId: 'zoneId_01', + publisher: '52', + position: 'left', + referrer: 'https://trace.mediago.io', bidfloor: 0.01, + ortb2Imp: { + ext: { + gpid: 'adslot_gpid', + tid: 'tid_01', + data: { + browsi: { + browsiViewability: 'NA', + }, + adserver: { + name: 'adserver_name', + adslot: 'adslot_name', + }, + }, + }, + }, }, mediaTypes: { banner: { sizes: [[300, 250]], + pos: 'left', + }, + }, + ortb2: { + user: { + ext: { + data: { + }, + }, }, }, adUnitCode: 'regular_iframe',