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

Merge in upstream Prebid master branch #5

Merged
merged 53 commits into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
52ff5e6
Initial checkin jixie adapter files (#5751)
jxdeveloper1 Sep 22, 2020
c210287
Rubicon Bid Adapter: Let host be configurable (#5779)
robertrmartinez Sep 22, 2020
4bddb0b
Rubicon Analytics Adapter: Custom Key Value reporting (#5778)
robertrmartinez Sep 22, 2020
b3e81e4
Prebid 4.9.0 Release
jsnellbaker Sep 22, 2020
540c7de
increment pre version
jsnellbaker Sep 22, 2020
1b932a0
Britepool user id module update (#5750)
bansawbanchee Sep 23, 2020
5f598b4
Add a new param cid to bridgewellBidAdapter (#5764)
rigelbibi Sep 23, 2020
8b9b86a
Refactor refererDetection to allow for URL discovery on AMP pages. (#…
mgriego Sep 23, 2020
6ea04f9
Intentiq id add url params (#5771)
yuvalgg Sep 24, 2020
7f2d81a
added instream video ad support (#5766)
drilon-kastrati Sep 24, 2020
80fc5b6
feat(sublimeBidAdapter): updating sublimeBidAdapter module (#5726)
fgcloutier Sep 24, 2020
27fe52a
Add GVL ID and bidder code to CriteoId module (#5781)
jesusalber1 Sep 24, 2020
3612308
Update BrightMountainMedia cookie sync URL (#5740)
Sep 24, 2020
f1ea594
Convert id5id to an object to support passing additional data points …
smenzer Sep 24, 2020
7aff389
Smaato: Support in-app use cases (#5765)
sbrosinski Sep 25, 2020
0fd7205
Added GVLID to Media.net Analytics Adapter (#5789)
monis0395 Sep 25, 2020
c8176d7
Add video ad support to ablida bid adapter (#5782)
Sep 25, 2020
05a5a96
Add adrelevantis adapter (#5735)
ghguo Sep 25, 2020
ecd05a3
Adnow bidder (#5738)
vingood Sep 25, 2020
b2f0c6d
Improve error and documentation for publisherId (#5788)
jsut Sep 25, 2020
280e957
SpotX bid adapter: add page parameter (#5784)
agdillon Sep 28, 2020
ebb51fb
Media.net Analytics improvements (#5755)
monis0395 Sep 28, 2020
c696e00
adagio Bid Adapter: add support for CCPA, COPPA (#5749)
osazos Sep 28, 2020
a054aa0
PubMatic analytics adapter: Not passing GDPR information (#5791)
pm-harshad-mane Sep 28, 2020
8168453
GumGum: adds support for new field - iriscat (#5790)
susyt Sep 29, 2020
eb9cf3f
fix a few id5 docs (#5793)
smenzer Sep 29, 2020
739bad8
New PubProvided Id UserId Submodule (#5767)
YerkovichM Sep 29, 2020
92e234c
standardize rubicon get config calls (#5780)
robertrmartinez Sep 29, 2020
242efdc
Prebid 4.10.0 Release
Sep 29, 2020
08e2bf2
Increment pre version
Sep 29, 2020
61e1485
Add Inmar bidder adapter (#5674)
zandree-owneriq Sep 30, 2020
083d76e
added detect referer (#5759)
ignat-one Sep 30, 2020
0c9bbf9
Qwarry bid adapter (#5662)
pro-nsk Sep 30, 2020
9573a42
Allow selection of supported default targeting keys at configuration …
mimenet Sep 30, 2020
1df6a22
cointrafficBidAdapter: added support responding in different currenci…
stsepelin Oct 1, 2020
303ccae
Send proper slot info in case of adUnitPath (#5810)
monis0395 Oct 1, 2020
c1c6aaa
Update to rubiconBidAdapter to include criteoId support (#5806)
mmoschovas Oct 1, 2020
804ff2f
appnexus bid adapter: criteo back to tpuids (#5808)
jsnellbaker Oct 1, 2020
907a9c7
Intentiq id add validation (#5797)
yuvalgg Oct 1, 2020
b5cf481
remove digitrust from rubicon bid adapter (#5798)
robertrmartinez Oct 5, 2020
ca22a45
add native preset handling and automatic price macro replacement (#5807)
mlequain Oct 5, 2020
664ec3b
fix some video request params (#5799)
robertrmartinez Oct 5, 2020
aa1e5e3
expose full user id config (including storage) to user id modules (#5…
smenzer Oct 6, 2020
ea498f9
Fix timeToFirstByte unit test (#5820)
Viewtiful Oct 6, 2020
8982e09
rubicon: adding pubcid support (#5824)
bretg Oct 6, 2020
16fabf4
Appnexus: Add omid support (#5821)
Fawke Oct 7, 2020
f907ee6
new userId module - neustar's fabrick (#5802)
andersonbd1 Oct 7, 2020
c57bab7
Integrate option to pass clickThrough urls to renderAd method (#5796)
renebaudisch Oct 7, 2020
ba1a35c
Add credentials and explicit options to CriteoIdSystem (#5822)
Swiiip Oct 7, 2020
e082c83
AdYouLike bidAdapter - Add information in bid request (#5828)
guiann Oct 7, 2020
84e7121
4.11.0 release
mkendall07 Oct 7, 2020
752bd27
4.12.0-pre
mkendall07 Oct 7, 2020
7d27095
IDx user id submodule (#5826)
rtoscani Oct 8, 2020
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
24 changes: 24 additions & 0 deletions integrationExamples/gpt/userId_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,30 @@
// },
userSync: {
userIds: [{
name: "pubProvidedId",
params: {
eids: [{
source: "domain.com",
uids:[{
id: "value read from cookie or local storage",
atype: 1,
ext: {
stype: "ppuid" // allowable options are sha256email, DMP, ppuid for now
}
}]
},{
source: "3rdpartyprovided.com",
uids:[{
id: "value read from cookie or local storage",
atype: 3,
ext: {
stype: "sha256email"
}
}]
}],
eidsFunction: getHashedEmail // any user defined function that exists in the page
}
},{
name: "unifiedId",
params: {
partner: "prebid",
Expand Down
4 changes: 3 additions & 1 deletion modules/.submodules.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"intentIqIdSystem",
"zeotapIdPlusIdSystem",
"haloIdSystem",
"quantcastIdSystem"
"quantcastIdSystem",
"idxIdSystem",
"fabrickIdSystem"
],
"adpod": [
"freeWheelAdserverVideo",
Expand Down
8 changes: 5 additions & 3 deletions modules/ablidaBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as utils from '../src/utils.js';
import {config} from '../src/config.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import { BANNER, NATIVE } from '../src/mediaTypes.js';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';

const BIDDER_CODE = 'ablida';
const ENDPOINT_URL = 'https://bidder.ablida.net/prebid';

export const spec = {
code: BIDDER_CODE,
supportedMediaTypes: [BANNER, NATIVE],
supportedMediaTypes: [BANNER, NATIVE, VIDEO],

/**
* Determines whether or not the given bid request is valid.
Expand All @@ -35,6 +35,8 @@ export const spec = {
let sizes = []
if (bidRequest.mediaTypes && bidRequest.mediaTypes[BANNER] && bidRequest.mediaTypes[BANNER].sizes) {
sizes = bidRequest.mediaTypes[BANNER].sizes;
} else if (bidRequest.mediaTypes[VIDEO] && bidRequest.mediaTypes[VIDEO].playerSize) {
sizes = bidRequest.mediaTypes[VIDEO].playerSize
}
const jaySupported = 'atob' in window && 'currentScript' in document;
const device = getDevice();
Expand All @@ -46,7 +48,7 @@ export const spec = {
referer: bidderRequest.refererInfo.referer,
jaySupported: jaySupported,
device: device,
adapterVersion: 4,
adapterVersion: 5,
mediaTypes: bidRequest.mediaTypes,
gdprConsent: bidderRequest.gdprConsent
};
Expand Down
16 changes: 16 additions & 0 deletions modules/ablidaBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ Module that connects to Ablida's bidder for bids.
}
}
]
}, {
code: 'video-ad',
mediaTypes: {
video: {
playerSize: [[640, 360]],
context: 'instream'
}
},
bids: [
{
bidder: 'ablida',
params: {
placementId: 'instream-demo'
}
}
]
}
];
```
21 changes: 19 additions & 2 deletions modules/adagioBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import find from 'core-js-pure/features/array/find.js';
import * as utils from '../src/utils.js';
import { config } from '../src/config.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import { loadExternalScript } from '../src/adloader.js'
import JSEncrypt from 'jsencrypt/bin/jsencrypt.js';
Expand All @@ -9,7 +10,7 @@ import { getRefererInfo } from '../src/refererDetection.js';

export const BIDDER_CODE = 'adagio';
export const LOG_PREFIX = 'Adagio:';
export const VERSION = '2.3.0';
export const VERSION = '2.4.0';
export const FEATURES_VERSION = '1';
export const ENDPOINT = 'https://mp.4dex.io/prebid';
export const SUPPORTED_MEDIA_TYPES = ['banner'];
Expand Down Expand Up @@ -555,6 +556,16 @@ function _getGdprConsent(bidderRequest) {
return consent;
}

function _getCoppa() {
return {
required: config.getConfig('coppa') === true ? 1 : 0
};
}

function _getUspConsent(bidderRequest) {
return (utils.deepAccess(bidderRequest, 'uspConsent')) ? { uspConsent: bidderRequest.uspConsent } : false;
}

function _getSchain(bidRequest) {
if (utils.deepAccess(bidRequest, 'schain')) {
return bidRequest.schain;
Expand Down Expand Up @@ -643,6 +654,8 @@ export const spec = {
const site = internal.getSite(bidderRequest);
const pageviewId = internal.getPageviewId();
const gdprConsent = _getGdprConsent(bidderRequest) || {};
const uspConsent = _getUspConsent(bidderRequest) || {};
const coppa = _getCoppa();
const schain = _getSchain(validBidRequests[0]);
const adUnits = utils._map(validBidRequests, (bidRequest) => {
bidRequest.features = internal.getFeatures(bidRequest, bidderRequest);
Expand Down Expand Up @@ -672,7 +685,11 @@ export const spec = {
site: site,
pageviewId: pageviewId,
adUnits: groupedAdUnits[organizationId],
gdpr: gdprConsent,
regs: {
gdpr: gdprConsent,
coppa: coppa,
ccpa: uspConsent
},
schain: schain,
prebidVersion: '$prebid.version$',
adapterVersion: VERSION,
Expand Down
4 changes: 2 additions & 2 deletions modules/adheseBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ function getAccount(validBidRequests) {
}

function getId5Id(validBidRequests) {
if (validBidRequests[0] && validBidRequests[0].userId && validBidRequests[0].userId.id5id) {
return validBidRequests[0].userId.id5id;
if (validBidRequests[0] && validBidRequests[0].userId && validBidRequests[0].userId.id5id && validBidRequests[0].userId.id5id.uid) {
return validBidRequests[0].userId.id5id.uid;
}
}

Expand Down
178 changes: 178 additions & 0 deletions modules/adnowBidAdapter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { NATIVE, BANNER } from '../src/mediaTypes.js';
import * as utils from '../src/utils.js';
import includes from 'core-js-pure/features/array/includes.js';

const BIDDER_CODE = 'adnow';
const ENDPOINT = 'https://n.ads3-adnow.com/a';

/**
* @typedef {object} CommonBidData
*
* @property {string} requestId The specific BidRequest which this bid is aimed at.
* This should match the BidRequest.bidId which this Bid targets.
* @property {string} currency The currency code for the cpm value
* @property {number} cpm The bid price, in US cents per thousand impressions.
* @property {string} creativeId The id of ad content
* @property {number} ttl Time-to-live - how long (in seconds) Prebid can use this bid.
* @property {boolean} netRevenue Boolean defining whether the bid is Net or Gross. The default is true (Net).
* @property {object} [meta] Object for storing bid meta data
* @property {string} [meta.mediaType] banner or native
*/

/** @type {BidderSpec} */
export const spec = {
code: BIDDER_CODE,
supportedMediaTypes: [ NATIVE, BANNER ],

/**
* @param {object} bid
* @return {boolean}
*/
isBidRequestValid(bid) {
if (!bid || !bid.params) return false;

const codeId = parseInt(bid.params.codeId, 10);
if (!codeId) {
return false;
}

const mediaType = bid.params.mediaType || NATIVE;

return includes(this.supportedMediaTypes, mediaType);
},

/**
* @param {BidRequest[]} validBidRequests
* @param {*} bidderRequest
* @return {ServerRequest}
*/
buildRequests(validBidRequests, bidderRequest) {
return validBidRequests.map(req => {
const mediaType = this._isBannerRequest(req) ? BANNER : NATIVE;
const codeId = parseInt(req.params.codeId, 10);

const data = {
Id: codeId,
mediaType: mediaType,
out: 'prebid',
d_user_agent: navigator.userAgent,
requestid: req.bidId
};

if (mediaType === BANNER) {
data.sizes = utils.parseSizesInput(
req.mediaTypes && req.mediaTypes.banner && req.mediaTypes.banner.sizes
).join('|')
} else {
data.width = data.height = 200;

let sizes = utils.deepAccess(req, 'mediaTypes.native.image.sizes', []);

if (sizes.length > 0) {
const size = Array.isArray(sizes[0]) ? sizes[0] : sizes;

data.width = size[0] || data.width;
data.height = size[1] || data.height;
}
}

/** @type {ServerRequest} */
return {
method: 'GET',
url: ENDPOINT,
data: utils.parseQueryStringParameters(data),
options: {
withCredentials: false,
crossOrigin: true
},
bidRequest: req
};
});
},

/**
* @param {*} response
* @param {ServerRequest} request
* @return {Bid[]}
*/
interpretResponse(response, request) {
const bidObj = request.bidRequest;
let bid = response.body;

if (!bid || !bid.currency || !bid.cpm) {
return [];
}

const mediaType = bid.meta.mediaType || NATIVE;
if (!includes(this.supportedMediaTypes, mediaType)) {
return [];
}

bid.requestId = bidObj.bidId;

if (mediaType === BANNER) {
return [ this._getBannerBid(bid) ];
}

if (mediaType === NATIVE) {
return [ this._getNativeBid(bid) ];
}

return [];
},

/**
* @private
* @param {object} bid
* @return {CommonBidData}
*/
_commonBidData(bid) {
return {
requestId: bid.requestId,
currency: bid.currency || 'USD',
cpm: bid.cpm || 0.00,
creativeId: bid.creativeId || 'undefined-creative',
netRevenue: bid.netRevenue || true,
ttl: bid.ttl || 360,
meta: bid.meta || {}
};
},

/**
* @param {BidRequest} req
* @return {boolean}
* @private
*/
_isBannerRequest(req) {
return !!(req.mediaTypes && req.mediaTypes.banner);
},

/**
* @private
* @param {object} bid
* @return {Bid}
*/
_getBannerBid(bid) {
return {
...this._commonBidData(bid),
width: bid.width || 300,
height: bid.height || 250,
ad: bid.ad || '<div>Empty Ad</div>'
};
},

/**
* @private
* @param {object} bid
* @return {Bid}
*/
_getNativeBid(bid) {
return {
...this._commonBidData(bid),
native: bid.native || {}
};
}
}

registerBidder(spec);
46 changes: 46 additions & 0 deletions modules/adnowBidAdapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Overview

```
Module Name: AdNow Bidder Adapter
Module Type: Bidder Adapter
Maintainer: support@adnow.com
```

# Description

AdNow Bidder Adapter for Prebid.js.
Banner and Native format are supported.
Please use ```adnow``` as the bidder code.

# Test Parameters
```javascript
const adUnits = [{
code: 'test',
mediaTypes: {
banner: {
sizes: [[300, 250]]
}
},
bids: [{
bidder: 'adnow',
params: {
codeId: 794934
}
}]
}, {
code: 'test',
mediaTypes: {
native: {
image: {
sizes: [200, 200]
}
}
},
bids: [{
bidder: 'adnow',
params: {
codeId: 794934
}
}]
}];
```
Loading