Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Mediago & Discovery BidAdapter:remove size filter #9585

Merged
merged 35 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d34c542
Mediago Bid Adapter:new adapter
Aug 17, 2022
dfea766
remove console
Aug 18, 2022
ba97c8a
change spec file to fix CircleCI
Aug 18, 2022
d96c1fc
change spec file to fix CircleCI
Aug 18, 2022
66bf6a0
change spec file
Aug 18, 2022
461cf79
Update mediagoBidAdapter.js
BaronJHYu Aug 24, 2022
618809e
Update mediagoBidAdapter.js
Aug 24, 2022
d4e14f7
rerun CurcleCi
BaronJHYu Aug 24, 2022
da74779
update mediagoBidAdapter
Sep 16, 2022
801884b
Merge branch 'master' of github.com:BaronJHYu/Prebid.js
Sep 16, 2022
63b7cc5
Merge branch 'master' of github.com:prebid/Prebid.js into prebid-master
Sep 16, 2022
8e4199c
Merge branch 'prebid-master'
Sep 16, 2022
20353cb
Merge branch 'prebid:master' into master
BaronJHYu Nov 16, 2022
b52fd79
update discoveryBidAdapter
Nov 16, 2022
541cfed
Merge branch 'prebid:master' into master
BaronJHYu Nov 30, 2022
9a55054
Discovery Bid Adapter : parameter updates
Nov 30, 2022
355d2b1
Mediago Bid Adapter : parameter updates
Nov 30, 2022
6fb0a02
Mediago Bid Adapter : code style format
Nov 30, 2022
68dcbd8
rerun circleci
Nov 30, 2022
bb2777c
rerun circleci
Dec 1, 2022
0ed9493
rerun circleci
Dec 1, 2022
d09cf94
rerun circleci
Dec 1, 2022
9e42186
Merge branch 'prebid:master' into master
BaronJHYu Feb 14, 2023
28b5d2b
Update mediagoBidAdapter & discoveryBidAdapter:report eids to server
Feb 14, 2023
809dc71
Merge branch 'master' of github.com:BaronJHYu/Prebid.js
Feb 14, 2023
5c24963
Update mediagoBidAdapter & discoveryBidAdapter:report eids to server
Feb 14, 2023
e103260
update Mediago & Discovery BidAdapter:remove size filter
Feb 24, 2023
f7e7b2a
update Mediago & Discovery BidAdapter:code format
Feb 24, 2023
2b1d8c0
update Mediago & Discovery BidAdapter:code format
Feb 24, 2023
d3c8806
update Mediago & Discovery BidAdapter:add param in banner format
Feb 24, 2023
8451b08
Merge branch 'prebid:master' into master
BaronJHYu Mar 3, 2023
32492f1
update mediago & discovery:first party data
Mar 3, 2023
455b843
Merge branch 'master' of github.com:BaronJHYu/Prebid.js
Mar 3, 2023
5d92500
update mediago & discovery:first party data
Mar 3, 2023
e897e9a
update mediago & discovery:first party data
Mar 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion modules/discoveryBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ function getItems(validBidRequests, bidderRequest) {
}
}
if (!matchSize) {
return {};
matchSize = sizes[0]
? { h: sizes[0].height || 0, w: sizes[0].width || 0 }
: { h: 0, w: 0 };
}
ret = {
id: id,
Expand All @@ -253,6 +255,7 @@ function getItems(validBidRequests, bidderRequest) {
h: matchSize.h,
w: matchSize.w,
pos: 1,
format: sizes,
},
ext: {},
tagid: globals['tagid'],
Expand Down Expand Up @@ -294,6 +297,7 @@ function getParam(validBidRequests, bidderRequest) {
const location = utils.deepAccess(bidderRequest, 'refererInfo.referer');
const page = utils.deepAccess(bidderRequest, 'refererInfo.page');
const referer = utils.deepAccess(bidderRequest, 'refererInfo.ref');
const firstPartyData = bidderRequest.ortb2;

if (items && items.length) {
let c = {
Expand All @@ -312,6 +316,7 @@ function getParam(validBidRequests, bidderRequest) {
},
ext: {
eids,
firstPartyData,
},
user: {
buyeruid: getUserID(),
Expand Down
39 changes: 6 additions & 33 deletions modules/mediagoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,6 @@ const storage = getStorageManager();
let globals = {};
let itemMaps = {};

/**
* 获取随机id
* @param {number} a random number from 0 to 15
* @return {string} random number or random string
*/
// function getRandomId(
// a // placeholder
// ) {
// // if the placeholder was passed, return
// // a random number from 0 to 15
// return a
// ? (
// a ^ // unless b is 8,
// ((Math.random() * // in which case
// 16) >> // a random number from
// (a / 4))
// ) // 8 to 11
// .toString(16) // in hexadecimal
// : ( // or otherwise a concatenated string:
// [1e7] + // 10000000 +
// 1e3 + // -1000 +
// 4e3 + // -4000 +
// 8e3 + // -80000000 +
// 1e11
// ) // -100000000000,
// .replace(
// // replacing
// /[018]/g, // zeroes, ones, and eights with
// getRandomId // random hex digits
// );
// }

/* ----- mguid:start ------ */
const COOKIE_KEY_MGUID = '__mguid_';

Expand Down Expand Up @@ -247,7 +215,9 @@ function getItems(validBidRequests, bidderRequest) {
}
}
if (!matchSize) {
return {};
matchSize = sizes[0]
? { h: sizes[0].height || 0, w: sizes[0].width || 0 }
: { h: 0, w: 0 };
}

const bidFloor = getBidFloor(req);
Expand All @@ -267,6 +237,7 @@ function getItems(validBidRequests, bidderRequest) {
h: matchSize.h,
w: matchSize.w,
pos: 1,
format: sizes,
},
ext: {
// gpid: gpid, // 加入后无法返回广告
Expand Down Expand Up @@ -310,6 +281,7 @@ function getParam(validBidRequests, bidderRequest) {
const referer = utils.deepAccess(bidderRequest, 'refererInfo.ref');

const timeout = bidderRequest.timeout || 2000;
const firstPartyData = bidderRequest.ortb2;

if (items && items.length) {
let c = {
Expand All @@ -330,6 +302,7 @@ function getParam(validBidRequests, bidderRequest) {
},
ext: {
eids,
firstPartyData,
},
user: {
buyeruid: getUserID(),
Expand Down