Skip to content

Commit

Permalink
Mediago Bid Adapter: add imp params for analysis (#10691)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
BaronJHYu and BaronYu authored Nov 6, 2023
1 parent 99d7e71 commit bb9be09
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/mediagoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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广告类型
Expand All @@ -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,
};
Expand Down
29 changes: 29 additions & 0 deletions test/spec/modules/mediagoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit bb9be09

Please sign in to comment.