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

Add Permutive module & bump version to 4.38 #117

Merged
merged 33 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c21ad7e
oneVideo Bid Adapter: Price Floors Module Support (SAPR-16735) (#6672)
adam-browning Apr 28, 2021
d9a7801
Spread adUnit.ortb2Imp.ext into imp object (#6494)
muuki88 Apr 29, 2021
9896409
appnexus bid adapter - ensure withCredentials is always passed (#6675)
jsnellbaker Apr 29, 2021
e206244
Axonix Bid Adapter: Fixed interpretResponse, support email (#6667)
cesarfd Apr 29, 2021
e93f455
Smartico Bid Adapter: add new bid adapter (#6486)
cs83 Apr 30, 2021
98dea2d
Interactive Offers Bid Adapter: add data to response object (#6680)
IOTiagoFaria Apr 30, 2021
51a69a2
remove space from spread operator
ChrisHuie Apr 30, 2021
43a5dc7
revert accidental commit to master
ChrisHuie Apr 30, 2021
3b9f184
Adkernel & AdkernelAdn: bidfloor module support (#6671)
ckbo3hrk Apr 30, 2021
4e5dda2
Update to change analytics flag from array to object (#6681)
mmoschovas Apr 30, 2021
22eacd9
support meta.advertiserDomains in bridgewell adpter (#6686)
rigelbibi May 3, 2021
67d8722
DMD ID System: add new User ID module (#6666)
boppudikarthikc May 3, 2021
1778504
appnexus Bid Adapter - add support for gptPreAuction (#6688)
jsnellbaker May 3, 2021
cf5b060
SharedId & PubcommonId: CCPA and COPPA support (#6632)
SKOCHERI May 3, 2021
9300d25
AppNexus bid adapter: add price floor module support (#6653)
jsnellbaker May 3, 2021
2e7209a
display bidder in utils.logs and disable bidder config on auction end…
snapwich May 3, 2021
a887289
add X-Prebid header to ajax requests fixes #6627 (#6676)
snapwich May 3, 2021
a14175a
Prebid Docs: Typo fix in README.md (#6704)
GLStephen May 5, 2021
93b3fd9
Revert "add X-Prebid header to ajax requests fixes #6627 (#6676)" (#6…
patmmccann May 5, 2021
70ce8ac
Criteo Bid Adapter: update contact email (#6701)
leonardlabat May 5, 2021
446931c
Fixing flaky adapter unit tests (#6706)
robertrmartinez May 5, 2021
7b16aac
Floc Userid System: add new ID module (#6521)
SKOCHERI May 5, 2021
017f630
Zeta Bid Adapter: update to endpoint (#6697)
mwehr-zeta May 5, 2021
62b2f76
prebid 4.38.0 release
mkendall07 May 5, 2021
78a3a80
order modules alphabetically
mxdvl May 10, 2021
1944a95
Merge tag '4.38.0' into permutive-rtb
mxdvl May 10, 2021
c37712a
bump to v4.38.0
mxdvl May 10, 2021
67ebc67
build prebid.js for c37712a6
mxdvl May 10, 2021
4448fc3
add real-time data module
mxdvl May 14, 2021
213328c
build prebid.js for 4448fc33
mxdvl May 14, 2021
84e6a0d
Permutive Rtd Submodule: register submodule in submodules list (#6768)
mxdvl May 17, 2021
2328002
build prebid.js for 213328cc
mxdvl May 19, 2021
a6d34e7
bump node to 14.17.0
mxdvl May 19, 2021
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
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.16.1
14.17.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ To run the unit tests:
gulp test
```

To run the unit tests for a perticular file (example for pubmaticBidAdapter_spec.js):
To run the unit tests for a particular file (example for pubmaticBidAdapter_spec.js):
```bash
gulp test --file "test/spec/modules/pubmaticBidAdapter_spec.js"
```
Expand Down
38 changes: 20 additions & 18 deletions build/dist/prebid.js

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions gulpHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ module.exports = {
message: 'failed reading: ' + moduleFile
});
}

// we need to forcefully include the parentModule if the subModule is present
Object.keys(submodules).forEach(parentModule => {
if (
!modules.includes(parentModule) &&
modules.some(module => submodules[parentModule].includes(module))
) {
modules.unshift(parentModule);
}
});

return modules;
},
/* gu-mod-end */
Expand Down
8 changes: 8 additions & 0 deletions integrationExamples/gpt/userId_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,14 @@
{
"name": "uid2"
}
,{
name: "flocId",
params: {
// Default sharedid.org token : "A3dHTSoNUMjjERBLlrvJSelNnwWUCwVQhZ5tNQ+sll7y+LkPPVZXtB77u2y7CweRIxiYaGwGXNlW1/dFp8VMEgIAAAB+eyJvcmlnaW4iOiJodHRwczovL3NoYXJlZGlkLm9yZzo0NDMiLCJmZWF0dXJlIjoiSW50ZXJlc3RDb2hvcnRBUEkiLCJleHBpcnkiOjE2MjYyMjA3OTksImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"
// To get new token, register https://developer.chrome.com/origintrials/#/trials/active for Federated Learning of Cohorts
token: "A3dHTSoNUMjjERBLlrvJSelNnwWUCwVQhZ5tNQ+sll7y+LkPPVZXtB77u2y7CweRIxiYaGwGXNlW1/dFp8VMEgIAAAB+eyJvcmlnaW4iOiJodHRwczovL3NoYXJlZGlkLm9yZzo0NDMiLCJmZWF0dXJlIjoiSW50ZXJlc3RDb2hvcnRBUEkiLCJleHBpcnkiOjE2MjYyMjA3OTksImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"
}
}
],
"syncDelay": 5000,
"auctionDelay": 1000
Expand Down
15 changes: 8 additions & 7 deletions modules.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
[
"adyoulikeBidAdapter",
"appnexusBidAdapter",
"consentManagement",
"consentManagementUsp",
"pubCommonId",
"guAnalyticsAdapter",
"adyoulikeBidAdapter",
"appnexusBidAdapter",
"improvedigitalBidAdapter",
"ixBidAdapter",
"prebidServerBidAdapter",
"sonobiBidAdapter",
"trustxBidAdapter",
"openxBidAdapter",
"ozoneBidAdapter",
"permutiveRtdProvider",
"prebidServerBidAdapter",
"pubCommonId",
"pubmaticBidAdapter",
"tripleliftBidAdapter"
"sonobiBidAdapter",
"tripleliftBidAdapter",
"trustxBidAdapter"
]
7 changes: 5 additions & 2 deletions modules/.submodules.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@
"tapadIdSystem",
"novatiqIdSystem",
"uid2IdSystem",
"admixerIdSystem"
"admixerIdSystem",
"dmdIdSystem",
"flocIdSystem"
],
"adpod": [
"freeWheelAdserverVideo",
"dfpAdServerVideo"
],
"rtdModule": [
"browsiRtdProvider",
"geoedgeRtdProvider",
"haloRtdProvider",
"jwplayerRtdProvider",
"permutiveRtdProvider",
"reconciliationRtdProvider",
"geoedgeRtdProvider",
"sirdataRtdProvider"
]
}
21 changes: 20 additions & 1 deletion modules/adkernelAdnBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ function buildImp(bidRequest) {
id: bidRequest.bidId,
tagid: bidRequest.adUnitCode
};
let mediaType;
let bannerReq = utils.deepAccess(bidRequest, `mediaTypes.banner`);
let videoReq = utils.deepAccess(bidRequest, `mediaTypes.video`);
if (bannerReq) {
let sizes = canonicalizeSizesArray(bannerReq.sizes);
imp.banner = {
format: utils.parseSizesInput(sizes)
}
};
mediaType = BANNER;
} else if (videoReq) {
let size = canonicalizeSizesArray(videoReq.playerSize)[0];
imp.video = {
Expand All @@ -34,6 +36,11 @@ function buildImp(bidRequest) {
protocols: videoReq.protocols || DEFAULT_PROTOCOLS,
api: videoReq.api || DEFAULT_APIS
};
mediaType = VIDEO;
}
let bidFloor = getBidFloor(bidRequest, mediaType, '*');
if (bidFloor) {
imp.bidfloor = bidFloor;
}
return imp;
}
Expand Down Expand Up @@ -113,6 +120,18 @@ function buildBid(tag) {
return bid;
}

function getBidFloor(bid, mediaType, sizes) {
var floor;
var size = sizes.length === 1 ? sizes[0] : '*';
if (typeof bid.getFloor === 'function') {
const floorInfo = bid.getFloor({currency: 'USD', mediaType, size});
if (typeof floorInfo === 'object' && floorInfo.currency === 'USD' && !isNaN(parseFloat(floorInfo.floor))) {
floor = parseFloat(floorInfo.floor);
}
}
return floor;
}

export const spec = {
code: 'adkernelAdn',
gvlid: GVLID,
Expand Down
39 changes: 33 additions & 6 deletions modules/adkernelBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {config} from '../src/config.js';
const VIDEO_TARGETING = Object.freeze(['mimes', 'minduration', 'maxduration', 'protocols',
'startdelay', 'linearity', 'boxingallowed', 'playbackmethod', 'delivery',
'pos', 'api', 'ext']);
const VERSION = '1.5';
const VERSION = '1.6';
const SYNC_IFRAME = 1;
const SYNC_IMAGE = 2;
const SYNC_TYPES = Object.freeze({
Expand Down Expand Up @@ -197,6 +197,18 @@ function dispatchImps(bidRequests, refererInfo) {
}, {});
}

function getBidFloor(bid, mediaType, sizes) {
var floor;
var size = sizes.length === 1 ? sizes[0] : '*';
if (typeof bid.getFloor === 'function') {
const floorInfo = bid.getFloor({currency: 'USD', mediaType, size});
if (typeof floorInfo === 'object' && floorInfo.currency === 'USD' && !isNaN(parseFloat(floorInfo.floor))) {
floor = parseFloat(floorInfo.floor);
}
}
return floor;
}

/**
* Builds rtb imp object for single adunit
* @param bidRequest {BidRequest}
Expand All @@ -207,27 +219,42 @@ function buildImp(bidRequest, secure) {
'id': bidRequest.bidId,
'tagid': bidRequest.adUnitCode
};
var mediaType;
var sizes = [];

if (utils.deepAccess(bidRequest, `mediaTypes.banner`)) {
let sizes = utils.getAdUnitSizes(bidRequest);
if (utils.deepAccess(bidRequest, 'mediaTypes.banner')) {
sizes = utils.getAdUnitSizes(bidRequest);
imp.banner = {
format: sizes.map(wh => utils.parseGPTSingleSizeArrayToRtbSize(wh)),
topframe: 0
};
mediaType = BANNER;
} else if (utils.deepAccess(bidRequest, 'mediaTypes.video')) {
let sizes = bidRequest.mediaTypes.video.playerSize || [];
imp.video = utils.parseGPTSingleSizeArrayToRtbSize(sizes[0]) || {};
let video = utils.deepAccess(bidRequest, 'mediaTypes.video');
imp.video = {};
if (video.playerSize) {
sizes = video.playerSize[0];
imp.video = Object.assign(imp.video, utils.parseGPTSingleSizeArrayToRtbSize(sizes) || {});
}
if (bidRequest.params.video) {
Object.keys(bidRequest.params.video)
.filter(key => includes(VIDEO_TARGETING, key))
.forEach(key => imp.video[key] = bidRequest.params.video[key]);
}
mediaType = VIDEO;
} else if (utils.deepAccess(bidRequest, 'mediaTypes.native')) {
let nativeRequest = buildNativeRequest(bidRequest.mediaTypes.native);
imp.native = {
ver: '1.1',
request: JSON.stringify(nativeRequest)
}
};
mediaType = NATIVE;
} else {
throw new Error('Unsupported bid received');
}
let floor = getBidFloor(bidRequest, mediaType, sizes);
if (floor) {
imp.bidfloor = floor;
}
if (secure) {
imp.secure = 1;
Expand Down
31 changes: 28 additions & 3 deletions modules/appnexusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,10 @@ function hasPurpose1Consent(bidderRequest) {

function formatRequest(payload, bidderRequest) {
let request = [];
let options = {};
let options = {
withCredentials: true
};

let endpointUrl = URL;

if (!hasPurpose1Consent(bidderRequest)) {
Expand Down Expand Up @@ -709,8 +712,9 @@ function bidToTag(bid) {
tag.use_pmt_rule = bid.params.usePaymentRule || false
tag.prebid = true;
tag.disable_psa = true;
if (bid.params.reserve) {
tag.reserve = bid.params.reserve;
let bidFloor = getBidFloor(bid);
if (bidFloor) {
tag.reserve = bidFloor;
}
if (bid.params.position) {
tag.position = { 'above': 1, 'below': 2 }[bid.params.position] || 0;
Expand Down Expand Up @@ -745,6 +749,11 @@ function bidToTag(bid) {
tag.keywords = keywords;
}

let gpid = utils.deepAccess(bid, 'ortb2Imp.ext.data.pbadslot');
if (gpid) {
tag.gpid = gpid;
}

if (bid.mediaType === NATIVE || utils.deepAccess(bid, `mediaTypes.${NATIVE}`)) {
tag.ad_types.push(NATIVE);
if (tag.sizes.length === 0) {
Expand Down Expand Up @@ -1042,4 +1051,20 @@ function addUserId(eids, id, source, rti) {
return eids;
}

function getBidFloor(bid) {
if (!utils.isFn(bid.getFloor)) {
return (bid.params.reserve) ? bid.params.reserve : null;
}

let floor = bid.getFloor({
currency: 'USD',
mediaType: '*',
size: '*'
});
if (utils.isPlainObject(floor) && !isNaN(floor.floor) && floor.currency === 'USD') {
return floor.floor;
}
return null;
}

registerBidder(spec);
25 changes: 12 additions & 13 deletions modules/axonixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as utils from '../src/utils.js';
import { ajax } from '../src/ajax.js';

const BIDDER_CODE = 'axonix';
const BIDDER_VERSION = '1.0.1';
const BIDDER_VERSION = '1.0.2';

const CURRENCY = 'USD';
const DEFAULT_REGION = 'us-east-1';
Expand Down Expand Up @@ -140,15 +140,17 @@ export const spec = {
},

interpretResponse: function(serverResponse) {
if (!utils.isArray(serverResponse)) {
const response = serverResponse ? serverResponse.body : [];

if (!utils.isArray(response)) {
return [];
}

const responses = [];

for (const response of serverResponse) {
if (response.requestId) {
responses.push(Object.assign(response, {
for (const resp of response) {
if (resp.requestId) {
responses.push(Object.assign(resp, {
ttl: config.getConfig('_bidderTimeout')
}));
}
Expand All @@ -171,15 +173,12 @@ export const spec = {
}
},

onBidWon: function(bids) {
for (const bid of bids) {
const { nurl } = bid || {};
onBidWon: function(bid) {
const { nurl } = bid || {};

if (bid.nurl) {
utils.replaceAuctionPrice(nurl, bid.cpm)
utils.triggerPixel(nurl);
};
}
if (bid.nurl) {
utils.triggerPixel(utils.replaceAuctionPrice(nurl, bid.cpm));
};
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/axonixBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```
Module Name : Axonix Bidder Adapter
Module Type : Bidder Adapter
Maintainer : support-prebid@axonix.com
Maintainer : support+prebid@axonix.com
```

# Description
Expand Down
4 changes: 4 additions & 0 deletions modules/bridgewellBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ export const spec = {
bidResponse.currency = matchedResponse.currency;
bidResponse.mediaType = matchedResponse.mediaType;

if (matchedResponse.adomain) {
utils.deepSetValue(bidResponse, 'meta.advertiserDomains', Array.isArray(matchedResponse.adomain) ? matchedResponse.adomain : [matchedResponse.adomain]);
}

// check required parameters by matchedResponse.mediaType
switch (matchedResponse.mediaType) {
case BANNER:
Expand Down
2 changes: 1 addition & 1 deletion modules/criteoBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Module Name: Criteo Bidder Adapter
Module Type: Bidder Adapter
Maintainer: pi-direct@criteo.com
Maintainer: prebid@criteo.com

# Description

Expand Down
Loading