Skip to content

Commit

Permalink
Merge master (prebid#8873)
Browse files Browse the repository at this point in the history
* 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 <zicong.zhou@indexexchange.com>

* 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 <zicong.zhou@indexexchange.com>

* 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 <pkowalski@id5.io>

* 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 <yakovklein@Yakovs-MacBook-Air.local>

* 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 <phoenixtechnerd@gmail.com>
Co-authored-by: Prebid.js automated release <prebidjs-release@prebid.org>
Co-authored-by: m-oranskaya <99481039+m-oranskaya@users.noreply.github.com>
Co-authored-by: Love Sharma <sharmak.love@gmail.com>
Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com>
Co-authored-by: Léonard Labat <le.labat@criteo.com>
Co-authored-by: wsusrasp <106743463+wsusrasp@users.noreply.github.com>
Co-authored-by: Catalin Ciocov <catalin.ciocov@gmail.com>
Co-authored-by: Mike Miller <mike@solitaired.com>
Co-authored-by: Demetrio Girardi <dgirardi@prebid.org>
Co-authored-by: Scott Menzer <scott@id5.io>
Co-authored-by: Paweł Kowalski <pkowalski@id5.io>
Co-authored-by: JacobKlein26 <42449375+JacobKlein26@users.noreply.github.com>
Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local>
Co-authored-by: caseywhitmire <60086994+caseywhitmire@users.noreply.github.com>
Co-authored-by: philan15 <37775368+philan15@users.noreply.github.com>
Co-authored-by: Gena <wertixvost@gmail.com>
  • Loading branch information
18 people authored Aug 21, 2022
1 parent 721cfdc commit 07c5369
Show file tree
Hide file tree
Showing 32 changed files with 1,379 additions and 1,058 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[![Build Status](https://circleci.com/gh/prebid/Prebid.js.svg?style=svg)](https://circleci.com/gh/prebid/Prebid.js)
[![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")
[![Code Climate](https://codeclimate.com/github/prebid/Prebid.js/badges/gpa.svg)](https://codeclimate.com/github/prebid/Prebid.js)
[![Coverage Status](https://coveralls.io/repos/github/prebid/Prebid.js/badge.svg)](https://coveralls.io/github/prebid/Prebid.js)
[![devDependencies Status](https://david-dm.org/prebid/Prebid.js/dev-status.svg)](https://david-dm.org/prebid/Prebid.js?type=dev)
[![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/)

# Prebid.js
Expand Down
17 changes: 5 additions & 12 deletions modules/adriverBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ADRIVER BID ADAPTER for Prebid 1.13
import { logInfo, getWindowLocation, getBidIdParameter, _each } from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { getStorageManager } from '../src/storageManager.js';

const BIDDER_CODE = 'adriver';
Expand All @@ -22,8 +22,6 @@ export const spec = {
},

buildRequests: function (validBidRequests, bidderRequest) {
logInfo('validBidRequests', validBidRequests);

let win = getWindowLocation();
let customID = Math.round(Math.random() * 999999999) + '-' + Math.round(new Date() / 1000) + '-1-46-';
let siteId = getBidIdParameter('siteid', validBidRequests[0].params) + '';
Expand Down Expand Up @@ -99,22 +97,17 @@ export const spec = {
});
});

let userid = validBidRequests[0].userId;
let adrcidCookie = storage.getDataFromLocalStorage('adrcid') || validBidRequests[0].userId.adrcid;

let adrcidCookie = storage.getDataFromLocalStorage('adrcid') || validBidRequests[0].userId?.adrcid;
if (adrcidCookie) {
payload.adrcid = adrcidCookie;
payload.id5 = userid.id5id;
payload.sharedid = userid.pubcid;
payload.unifiedid = userid.tdid;
payload.user.buyerid = adrcidCookie;
}
const payloadString = JSON.stringify(payload);

return {
method: 'POST',
url: ADRIVER_BID_URL,
data: payloadString,
};
data: payloadString
}
},

interpretResponse: function (serverResponse, bidRequest) {
Expand Down
3 changes: 2 additions & 1 deletion modules/adriverIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export const adriverIdSubmodule = {
callback();
}
};
ajax(url, callbacks, undefined, {method: 'GET'});
let newUrl = url + '&cid=' + (storage.getDataFromLocalStorage('adrcid') || storage.getCookie('adrcid'));
ajax(newUrl, callbacks, undefined, {method: 'GET'});
}
};
return {callback: resp};
Expand Down
2 changes: 2 additions & 0 deletions modules/adtelligentBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const HOST_GETTERS = {
janet: () => 'ghb.bidder.jmgads.com',
pgam: () => 'ghb.pgamssp.com',
ocm: () => 'ghb.cenarius.orangeclickmedia.com',
vidcrunchllc: () => 'ghb.platform.vidcrunch.com',
}
const getUri = function (bidderCode) {
let bidderWithoutSuffix = bidderCode.split('_')[0];
Expand All @@ -43,6 +44,7 @@ export const spec = {
{ code: 'navelix', gvlid: 380 },
'pgam',
'ocm',
{ code: 'vidcrunchllc', gvlid: 1145 },
],
supportedMediaTypes: [VIDEO, BANNER],
isBidRequestValid: function (bid) {
Expand Down
32 changes: 19 additions & 13 deletions modules/criteoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,15 +469,20 @@ function buildCdbRequest(context, bidRequests, bidderRequest) {
if (bidRequest.params.publisherSubId) {
slot.publishersubid = bidRequest.params.publisherSubId;
}
if (bidRequest.params.nativeCallback || deepAccess(bidRequest, `mediaTypes.${NATIVE}`)) {

if (bidRequest.params.nativeCallback || hasNativeMediaType(bidRequest)) {
slot.native = true;
if (!checkNativeSendId(bidRequest)) {
logWarn(LOG_PREFIX + 'all native assets containing URL should be sent as placeholders with sendId(icon, image, clickUrl, displayUrl, privacyLink, privacyIcon)');
}
slot.sizes = parseSizes(deepAccess(bidRequest, 'mediaTypes.banner.sizes'), parseNativeSize);
} else {
}

if (hasBannerMediaType(bidRequest)) {
slot.sizes = parseSizes(deepAccess(bidRequest, 'mediaTypes.banner.sizes'), parseSize);
} else {
slot.sizes = [];
}

if (hasVideoMediaType(bidRequest)) {
const video = {
playersizes: parseSizes(deepAccess(bidRequest, 'mediaTypes.video.playerSize'), parseSize),
Expand Down Expand Up @@ -554,17 +559,18 @@ function parseSize(size) {
return size[0] + 'x' + size[1];
}

function parseNativeSize(size) {
if (size[0] === undefined && size[1] === undefined) {
return '2x2';
}
return size[0] + 'x' + size[1];
}

function hasVideoMediaType(bidRequest) {
return deepAccess(bidRequest, 'mediaTypes.video') !== undefined;
}

function hasBannerMediaType(bidRequest) {
return deepAccess(bidRequest, 'mediaTypes.banner') !== undefined;
}

function hasNativeMediaType(bidRequest) {
return deepAccess(bidRequest, 'mediaTypes.native') !== undefined;
}

function hasValidVideoMediaType(bidRequest) {
let isValid = true;

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

if (bidRequest.mediaTypes?.video) {
slotFloors.video = {};
const videoSizes = parseSizes(deepAccess(bidRequest, 'mediaTypes.video.playerSize'))
videoSizes.forEach(videoSize => slotFloors.video[parseSize(videoSize).toString()] = bidRequest.getFloor({size: videoSize, mediaType: VIDEO}));
videoSizes.forEach(videoSize => slotFloors.video[parseSize(videoSize).toString()] = bidRequest.getFloor({ size: videoSize, mediaType: VIDEO }));
}

if (bidRequest.mediaTypes?.native) {
slotFloors.native = {};
slotFloors.native['*'] = bidRequest.getFloor({size: '*', mediaType: NATIVE});
slotFloors.native['*'] = bidRequest.getFloor({ size: '*', mediaType: NATIVE });
}

if (Object.keys(slotFloors).length > 0) {
Expand Down
9 changes: 9 additions & 0 deletions modules/dgkeywordRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ export function getDgKeywordsAndSet(reqBidsConfigObj, callback, moduleConfig, us
const timeout = (moduleConfig && moduleConfig.params && moduleConfig.params.timeout && Number(moduleConfig.params.timeout) > 0) ? Number(moduleConfig.params.timeout) : PROFILE_TIMEOUT_MS;
const url = (moduleConfig && moduleConfig.params && moduleConfig.params.url) ? moduleConfig.params.url : URL + encodeURIComponent(window.location.href);
const adUnits = reqBidsConfigObj.adUnits || getGlobal().adUnits;
callback = (function(cb) {
let done = false;
return function () {
if (!done) {
done = true;
return cb.apply(this, arguments);
}
}
})(callback);
let isFinish = false;
logMessage('[dgkeyword sub module]', adUnits, timeout);
let setKeywordTargetBidders = getTargetBidderOfDgKeywords(adUnits);
Expand Down
Loading

0 comments on commit 07c5369

Please sign in to comment.