Skip to content

Commit 07c5369

Browse files
patmmccannChrisHuieprebidjs-releasem-oranskayalksharma
authored
Merge master (prebid#8873)
* Readme: remove dead dev dependency and maintenance badges (prebid#8849) * Readme: remove dead dev dependency badge and issue * Remove maintainability and add back issues * Prebid 7.11.0 release * Increment version to 7.12.0-pre * Adriver Bid and Id Modules: buyerid bug fix (prebid#8768) * initial commit * adriver id submodule add * add id system tests, fix adriver bid adapter tests * adriver: fix buyerid * remarks fixing * removal of excess * delete custom parameter * bug fixes * handle native response privacy link (prebid#8838) Co-authored-by: Zicong Zhou <[email protected]> * Criteo Bid Adapter - Add support for banner+native multiformat ad unit (prebid#8842) Previously, the use of a native adunit was exclusive with the banner type. * Ras Bid Adapter: support for SlotSequence parameter (prebid#8792) * add rasbidadapter pos param * Read pos off the adunit * rename conflicting pos parameter for clarity * Improve Digital adapter: refactor code to align with latest RAZR creative tags (prebid#8827) * IX Bid Adapter: Native OpenRTB Request Support (prebid#8853) * fix native click trackers to only fire on click * fix unit tests for ix * remove version for native requests * remove unnecessary request conversion Co-authored-by: Zicong Zhou <[email protected]> * Update Sonobi adapter with GVLID (prebid#8860) * dgkeyword RTD provider: fix tests causing ID5 test failures (prebid#8862) * Id5 id configurable fetch flow (prebid#8784) Co-authored-by: Paweł Kowalski <[email protected]> * NextMillenium Bid Adapter: Remove ortb2 referrerInfo (prebid#8868) * remove ortb2, get device/site manually * updated tests * remove fallbacks * no need to craete variable if there is no fallback (return in place) * removed one test case Co-authored-by: Yakov Klein <[email protected]> * adserver.js : remove unused code (prebid#8855) * Displayio Bid Adapter: custom render; fix eids payload (prebid#8847) * Custom render; call pubmatic get user id function is removed * use refererInfo; remove call createEidsArray * VidCrunch LLC bidder (prebid#8872) Co-authored-by: Chris Huie <[email protected]> Co-authored-by: Prebid.js automated release <[email protected]> Co-authored-by: m-oranskaya <[email protected]> Co-authored-by: Love Sharma <[email protected]> Co-authored-by: Zicong Zhou <[email protected]> Co-authored-by: Léonard Labat <[email protected]> Co-authored-by: wsusrasp <[email protected]> Co-authored-by: Catalin Ciocov <[email protected]> Co-authored-by: Mike Miller <[email protected]> Co-authored-by: Demetrio Girardi <[email protected]> Co-authored-by: Scott Menzer <[email protected]> Co-authored-by: Paweł Kowalski <[email protected]> Co-authored-by: JacobKlein26 <[email protected]> Co-authored-by: Yakov Klein <[email protected]> Co-authored-by: caseywhitmire <[email protected]> Co-authored-by: philan15 <[email protected]> Co-authored-by: Gena <[email protected]>
1 parent 721cfdc commit 07c5369

32 files changed

+1379
-1058
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
[![Build Status](https://circleci.com/gh/prebid/Prebid.js.svg?style=svg)](https://circleci.com/gh/prebid/Prebid.js)
22
[![Percentage of issues still open](http://isitmaintained.com/badge/open/prebid/Prebid.js.svg)](http://isitmaintained.com/project/prebid/Prebid.js "Percentage of issues still open")
3-
[![Code Climate](https://codeclimate.com/github/prebid/Prebid.js/badges/gpa.svg)](https://codeclimate.com/github/prebid/Prebid.js)
43
[![Coverage Status](https://coveralls.io/repos/github/prebid/Prebid.js/badge.svg)](https://coveralls.io/github/prebid/Prebid.js)
5-
[![devDependencies Status](https://david-dm.org/prebid/Prebid.js/dev-status.svg)](https://david-dm.org/prebid/Prebid.js?type=dev)
64
[![Total Alerts](https://img.shields.io/lgtm/alerts/g/prebid/Prebid.js.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/prebid/Prebid.js/alerts/)
75

86
# Prebid.js

modules/adriverBidAdapter.js

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ADRIVER BID ADAPTER for Prebid 1.13
22
import { logInfo, getWindowLocation, getBidIdParameter, _each } from '../src/utils.js';
3-
import {registerBidder} from '../src/adapters/bidderFactory.js';
3+
import { registerBidder } from '../src/adapters/bidderFactory.js';
44
import { getStorageManager } from '../src/storageManager.js';
55

66
const BIDDER_CODE = 'adriver';
@@ -22,8 +22,6 @@ export const spec = {
2222
},
2323

2424
buildRequests: function (validBidRequests, bidderRequest) {
25-
logInfo('validBidRequests', validBidRequests);
26-
2725
let win = getWindowLocation();
2826
let customID = Math.round(Math.random() * 999999999) + '-' + Math.round(new Date() / 1000) + '-1-46-';
2927
let siteId = getBidIdParameter('siteid', validBidRequests[0].params) + '';
@@ -99,22 +97,17 @@ export const spec = {
9997
});
10098
});
10199

102-
let userid = validBidRequests[0].userId;
103-
let adrcidCookie = storage.getDataFromLocalStorage('adrcid') || validBidRequests[0].userId.adrcid;
104-
100+
let adrcidCookie = storage.getDataFromLocalStorage('adrcid') || validBidRequests[0].userId?.adrcid;
105101
if (adrcidCookie) {
106-
payload.adrcid = adrcidCookie;
107-
payload.id5 = userid.id5id;
108-
payload.sharedid = userid.pubcid;
109-
payload.unifiedid = userid.tdid;
102+
payload.user.buyerid = adrcidCookie;
110103
}
111104
const payloadString = JSON.stringify(payload);
112105

113106
return {
114107
method: 'POST',
115108
url: ADRIVER_BID_URL,
116-
data: payloadString,
117-
};
109+
data: payloadString
110+
}
118111
},
119112

120113
interpretResponse: function (serverResponse, bidRequest) {

modules/adriverIdSystem.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ export const adriverIdSubmodule = {
7373
callback();
7474
}
7575
};
76-
ajax(url, callbacks, undefined, {method: 'GET'});
76+
let newUrl = url + '&cid=' + (storage.getDataFromLocalStorage('adrcid') || storage.getCookie('adrcid'));
77+
ajax(newUrl, callbacks, undefined, {method: 'GET'});
7778
}
7879
};
7980
return {callback: resp};

modules/adtelligentBidAdapter.js

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const HOST_GETTERS = {
2323
janet: () => 'ghb.bidder.jmgads.com',
2424
pgam: () => 'ghb.pgamssp.com',
2525
ocm: () => 'ghb.cenarius.orangeclickmedia.com',
26+
vidcrunchllc: () => 'ghb.platform.vidcrunch.com',
2627
}
2728
const getUri = function (bidderCode) {
2829
let bidderWithoutSuffix = bidderCode.split('_')[0];
@@ -43,6 +44,7 @@ export const spec = {
4344
{ code: 'navelix', gvlid: 380 },
4445
'pgam',
4546
'ocm',
47+
{ code: 'vidcrunchllc', gvlid: 1145 },
4648
],
4749
supportedMediaTypes: [VIDEO, BANNER],
4850
isBidRequestValid: function (bid) {

modules/criteoBidAdapter.js

+19-13
Original file line numberDiff line numberDiff line change
@@ -469,15 +469,20 @@ function buildCdbRequest(context, bidRequests, bidderRequest) {
469469
if (bidRequest.params.publisherSubId) {
470470
slot.publishersubid = bidRequest.params.publisherSubId;
471471
}
472-
if (bidRequest.params.nativeCallback || deepAccess(bidRequest, `mediaTypes.${NATIVE}`)) {
472+
473+
if (bidRequest.params.nativeCallback || hasNativeMediaType(bidRequest)) {
473474
slot.native = true;
474475
if (!checkNativeSendId(bidRequest)) {
475476
logWarn(LOG_PREFIX + 'all native assets containing URL should be sent as placeholders with sendId(icon, image, clickUrl, displayUrl, privacyLink, privacyIcon)');
476477
}
477-
slot.sizes = parseSizes(deepAccess(bidRequest, 'mediaTypes.banner.sizes'), parseNativeSize);
478-
} else {
478+
}
479+
480+
if (hasBannerMediaType(bidRequest)) {
479481
slot.sizes = parseSizes(deepAccess(bidRequest, 'mediaTypes.banner.sizes'), parseSize);
482+
} else {
483+
slot.sizes = [];
480484
}
485+
481486
if (hasVideoMediaType(bidRequest)) {
482487
const video = {
483488
playersizes: parseSizes(deepAccess(bidRequest, 'mediaTypes.video.playerSize'), parseSize),
@@ -554,17 +559,18 @@ function parseSize(size) {
554559
return size[0] + 'x' + size[1];
555560
}
556561

557-
function parseNativeSize(size) {
558-
if (size[0] === undefined && size[1] === undefined) {
559-
return '2x2';
560-
}
561-
return size[0] + 'x' + size[1];
562-
}
563-
564562
function hasVideoMediaType(bidRequest) {
565563
return deepAccess(bidRequest, 'mediaTypes.video') !== undefined;
566564
}
567565

566+
function hasBannerMediaType(bidRequest) {
567+
return deepAccess(bidRequest, 'mediaTypes.banner') !== undefined;
568+
}
569+
570+
function hasNativeMediaType(bidRequest) {
571+
return deepAccess(bidRequest, 'mediaTypes.native') !== undefined;
572+
}
573+
568574
function hasValidVideoMediaType(bidRequest) {
569575
let isValid = true;
570576

@@ -646,18 +652,18 @@ function enrichSlotWithFloors(slot, bidRequest) {
646652
if (bidRequest.mediaTypes?.banner) {
647653
slotFloors.banner = {};
648654
const bannerSizes = parseSizes(deepAccess(bidRequest, 'mediaTypes.banner.sizes'))
649-
bannerSizes.forEach(bannerSize => slotFloors.banner[parseSize(bannerSize).toString()] = bidRequest.getFloor({size: bannerSize, mediaType: BANNER}));
655+
bannerSizes.forEach(bannerSize => slotFloors.banner[parseSize(bannerSize).toString()] = bidRequest.getFloor({ size: bannerSize, mediaType: BANNER }));
650656
}
651657

652658
if (bidRequest.mediaTypes?.video) {
653659
slotFloors.video = {};
654660
const videoSizes = parseSizes(deepAccess(bidRequest, 'mediaTypes.video.playerSize'))
655-
videoSizes.forEach(videoSize => slotFloors.video[parseSize(videoSize).toString()] = bidRequest.getFloor({size: videoSize, mediaType: VIDEO}));
661+
videoSizes.forEach(videoSize => slotFloors.video[parseSize(videoSize).toString()] = bidRequest.getFloor({ size: videoSize, mediaType: VIDEO }));
656662
}
657663

658664
if (bidRequest.mediaTypes?.native) {
659665
slotFloors.native = {};
660-
slotFloors.native['*'] = bidRequest.getFloor({size: '*', mediaType: NATIVE});
666+
slotFloors.native['*'] = bidRequest.getFloor({ size: '*', mediaType: NATIVE });
661667
}
662668

663669
if (Object.keys(slotFloors).length > 0) {

modules/dgkeywordRtdProvider.js

+9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ export function getDgKeywordsAndSet(reqBidsConfigObj, callback, moduleConfig, us
2525
const timeout = (moduleConfig && moduleConfig.params && moduleConfig.params.timeout && Number(moduleConfig.params.timeout) > 0) ? Number(moduleConfig.params.timeout) : PROFILE_TIMEOUT_MS;
2626
const url = (moduleConfig && moduleConfig.params && moduleConfig.params.url) ? moduleConfig.params.url : URL + encodeURIComponent(window.location.href);
2727
const adUnits = reqBidsConfigObj.adUnits || getGlobal().adUnits;
28+
callback = (function(cb) {
29+
let done = false;
30+
return function () {
31+
if (!done) {
32+
done = true;
33+
return cb.apply(this, arguments);
34+
}
35+
}
36+
})(callback);
2837
let isFinish = false;
2938
logMessage('[dgkeyword sub module]', adUnits, timeout);
3039
let setKeywordTargetBidders = getTargetBidderOfDgKeywords(adUnits);

0 commit comments

Comments
 (0)