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 master #2

Merged
merged 44 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0fed339
fix for userSync endpoint getting called with bidder alias names, ins…
Fawke Oct 17, 2019
315bd19
modify ixBidAdapater to always use the secure endpoint (#4323)
ix-prebid-support Oct 17, 2019
64bd851
PubMatic to support Parrable User Id sub-module (#4324)
pm-harshad-mane Oct 17, 2019
b89d006
VISX: currency validation & fix double escape of referer (#4299)
mk0x9 Oct 18, 2019
cde90dc
PubMatic to support coppa (#4336)
pm-harshad-mane Oct 21, 2019
ab91441
vuble: outstream has fullscreen option (#4320)
Roffray Oct 21, 2019
f919f58
EMXDigital: hotfix to resolve URIError from decodeURIComponent (#4333)
EMXDigital Oct 21, 2019
56d6c59
Specify second parameter for parseInt for pubmaticBidAdapter (#4347)
rumesh Oct 21, 2019
a65a11b
Remove usage of getTopWindowUrl in Prebid Adapter (#4341)
bmwcmw Oct 22, 2019
b5f3c99
Conversant Bid Adapter update for 3.0 (#4284)
pycnvr Oct 22, 2019
f92650f
Add cpmDistribution function for Google Analytics adapter (#4240)
muuki88 Oct 22, 2019
2318453
fixing SRA p_pos (#4337)
robertrmartinez Oct 22, 2019
23fad51
In Sonobi Adapter, only read sizes from bid.mediaTypes (#4311)
JonGoSonobi Oct 22, 2019
8b85edc
Fix mediaTypes (#4332)
TinchoF Oct 22, 2019
d4e09b4
Prebid 2.37.0 release
jsnellbaker Oct 22, 2019
f2ee258
increment pre version
jsnellbaker Oct 22, 2019
efc90a6
Add vast xml support and other minor changes to Beachfront adapter (#…
jsalis Oct 23, 2019
be6704b
Update smartrtbBidAdapter (#4362)
evanmsmrtb Oct 23, 2019
04b8105
Revert "Update smartrtbBidAdapter (#4362)" (#4368)
jsnellbaker Oct 23, 2019
02f6cbc
Add userSync in onetagBidAdapter (#4358)
onetag-dev Oct 23, 2019
6114a3d
Sovrn adapter updates: schain, digitrust, pixel syncing, and 3.0 upgr…
aprakash-sovrn Oct 23, 2019
f69ec24
Add bid adapter for ablida (#4256)
Oct 24, 2019
df020d7
AdKernel: added waardex_ak alias (#4290)
romanantropov Oct 24, 2019
ea2fc95
Revert "Sovrn adapter updates: schain, digitrust, pixel syncing, and …
msm0504 Oct 24, 2019
2376a7f
Vrtcal Markets Inc. Bid Adapter Addition (#4259)
vrtcal-dev Oct 24, 2019
6c908ce
Update schain path in ORTB path for spotxBidAdapter (#4377)
codybonney Oct 25, 2019
59a3229
Update Grid Bid Adapter (#4379)
TheMediaGrid Oct 25, 2019
275c56e
TripleLift: Sending schain (#4375)
colbertk Oct 25, 2019
52e663a
DistrictmDMX: adding support for schain and remove content type to de…
stevealliance Oct 25, 2019
6aa49a6
Support for ID5 + receive meta data (#4352)
bjorn-lw Oct 25, 2019
45bd063
Rubicon Adapter: Always make requests using HTTPS (#4380)
msm0504 Oct 28, 2019
322f12b
7xbid adapter (#4328)
7XBID00 Oct 28, 2019
be48754
- update 33across adapter cookie sync end point (#4345)
thomas-33across Oct 29, 2019
dcdd457
Adform adapter: add renderer for outstream bids (#4363)
bratrahim Oct 29, 2019
f539e74
Prebid 2.38.0 Release
Oct 29, 2019
741b489
Increment pre version
Oct 29, 2019
4b3bfaf
Adagio: update with external js (#4217)
osazos Oct 29, 2019
e1a62ae
add viewdeosDX whitelabel (#4231)
GeneGenie Oct 29, 2019
3ea73d4
One video display ad (#4344)
DeepthiNeeladri Oct 30, 2019
f77c0c2
fix double-urlecoded referrer (#4386)
onlsol Oct 30, 2019
2c1a8be
fix double-urlecoded referrer (#4387)
onlsol Oct 30, 2019
3f2b2c2
fix double-urlecoded referer (#4388)
onlsol Oct 30, 2019
9409959
PulsePoint Adapter - update for ttl logic (#4400)
anand-venkatraman Oct 30, 2019
1231f72
IdentityLink - add logic for sending consent string (#4346)
mamatic Oct 30, 2019
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
4 changes: 2 additions & 2 deletions modules/33acrossBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as utils from '../src/utils';

const BIDDER_CODE = '33across';
const END_POINT = 'https://ssc.33across.com/api/v1/hb';
const SYNC_ENDPOINT = 'https://de.tynt.com/deb/v2?m=xch&rt=html';
const SYNC_ENDPOINT = 'https://ssc-cms.33across.com/ps/?m=xch&rt=html&ru=deb';

const adapterState = {};

Expand Down Expand Up @@ -144,7 +144,7 @@ function _createServerRequest(bidRequest, gdprConsent = {}) {
}

// Sync object will always be of type iframe for TTX
function _createSync({siteId, gdprConsent = {}}) {
function _createSync({siteId = 'zzz000000000003zzz', gdprConsent = {}}) {
const ttxSettings = config.getConfig('ttxSettings');
const syncUrl = (ttxSettings && ttxSettings.syncUrl) || SYNC_ENDPOINT;

Expand Down
157 changes: 157 additions & 0 deletions modules/7xbidBidAdapter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
import * as utils from '../src/utils';
import { registerBidder } from '../src/adapters/bidderFactory';

const BIDDER_CODE = '7xbid';
const BIDDER_ALIAS = '7xb';
const ENDPOINT_BANNER = '//bidder.7xbid.com/api/v1/prebid/banner';
const ENDPOINT_NATIVE = '//bidder.7xbid.com/api/v1/prebid/native';
const COOKIE_SYNC_URL = '//bidder.7xbid.com/api/v1/cookie/gen';
const SUPPORTED_MEDIA_TYPES = ['banner', 'native'];
const SUPPORTED_CURRENCIES = ['USD', 'JPY'];
const DEFAULT_CURRENCY = 'JPY';
const NET_REVENUE = true;

const _encodeURIComponent = function(a) {
let b = window.encodeURIComponent(a);
b = b.replace(/'/g, '%27');
return b;
}

export const _getUrlVars = function(url) {
var hash;
var myJson = {};
var hashes = url.slice(url.indexOf('?') + 1).split('&');
for (var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
myJson[hash[0]] = hash[1];
}
return myJson;
}

export const spec = {
code: BIDDER_CODE,
aliases: [BIDDER_ALIAS], // short code
supportedMediaTypes: SUPPORTED_MEDIA_TYPES,
isBidRequestValid: function(bid) {
if (!(bid.params.placementId)) {
return false;
}

if (bid.params.hasOwnProperty('currency') &&
SUPPORTED_CURRENCIES.indexOf(bid.params.currency) === -1) {
utils.logInfo('Invalid currency type, we support only JPY and USD!')
return false;
}

return true;
},
/**
* Make a server request from the list of BidRequests.
*
* @param {validBidRequests[]} - an array of bids
* @return ServerRequest Info describing the request to the server.
*/
buildRequests: function(validBidRequests, bidderRequest) {
let serverRequests = [];
var refererInfo;
if (bidderRequest && bidderRequest.refererInfo) {
refererInfo = bidderRequest.refererInfo;
}
var g = (typeof (geparams) !== 'undefined' && typeof (geparams) == 'object' && geparams) ? geparams : {};
validBidRequests.forEach((bid, i) => {
let endpoint = ENDPOINT_BANNER
let data = {
'placementid': bid.params.placementId,
'cur': bid.params.hasOwnProperty('currency') ? bid.params.currency : DEFAULT_CURRENCY,
'ua': navigator.userAgent,
'adtk': _encodeURIComponent(g.lat ? '0' : '1'),
'loc': utils.getTopWindowUrl(),
'topframe': (window.parent === window.self) ? 1 : 0,
'sw': screen && screen.width,
'sh': screen && screen.height,
'cb': Math.floor(Math.random() * 99999999999),
'tpaf': 1,
'cks': 1,
'requestid': bid.bidId
};

if (bid.hasOwnProperty('nativeParams')) {
endpoint = ENDPOINT_NATIVE
data.tkf = 1 // return url tracker
data.ad_track = '1'
data.apiv = '1.1.0'
}

if (refererInfo && refererInfo.referer) {
data.referer = refererInfo.referer;
} else {
data.referer = '';
}

serverRequests.push({
method: 'GET',
url: endpoint,
data: utils.parseQueryStringParameters(data)
})
})

return serverRequests;
},
interpretResponse: function(serverResponse, request) {
const data = _getUrlVars(request.data)
const successBid = serverResponse.body || {};
let bidResponses = [];
if (successBid.hasOwnProperty(data.placementid)) {
let bid = successBid[data.placementid]
let bidResponse = {
requestId: bid.requestid,
cpm: bid.price,
creativeId: bid.creativeId,
currency: bid.cur,
netRevenue: NET_REVENUE,
ttl: 700
};

if (bid.hasOwnProperty('title')) { // it is native ad response
bidResponse.mediaType = 'native'
bidResponse.native = {
title: bid.title,
body: bid.description,
cta: bid.cta,
sponsoredBy: bid.advertiser,
clickUrl: _encodeURIComponent(bid.landingURL),
impressionTrackers: bid.trackings,
}
if (bid.screenshots) {
bidResponse.native.image = {
url: bid.screenshots.url,
height: bid.screenshots.height,
width: bid.screenshots.width,
}
}
if (bid.icon) {
bidResponse.native.icon = {
url: bid.icon.url,
height: bid.icon.height,
width: bid.icon.width,
}
}
} else {
bidResponse.ad = bid.adm
bidResponse.width = bid.width
bidResponse.height = bid.height
}

bidResponses.push(bidResponse);
}

return bidResponses;
},
getUserSyncs: function(syncOptions, serverResponses) {
return [{
type: 'image',
url: COOKIE_SYNC_URL
}];
}
}
registerBidder(spec);
60 changes: 60 additions & 0 deletions modules/7xbidBidAdapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Overview

Module Name: 7xbid Bid Adapter

Maintainer: 7xbid.com@gmail.com

# Description

Module that connects to 7xbid's demand sources

# Test Parameters
```javascript
var adUnits = [
{
code: 'test',
mediaTypes: {
banner: {
sizes: [[300, 250], [300,600]],
}
},
bids: [
{
bidder: '7xbid',
params: {
placementId: 1425292,
currency: 'USD'

}
}
]
},
{
code: 'test',
mediaTypes: {
native: {
title: {
required: true,
len: 80
},
image: {
required: true,
sizes: [150, 50]
},
sponsoredBy: {
required: true
}
}
},
bids: [
{
bidder: '7xbid',
params: {
placementId: 1429695,
currency: 'USD'
}
},
],
}
];
```
93 changes: 93 additions & 0 deletions modules/ablidaBidAdapter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import * as utils from '../src/utils';
import {config} from '../src/config';
import {registerBidder} from '../src/adapters/bidderFactory';

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

export const spec = {
code: BIDDER_CODE,

/**
* Determines whether or not the given bid request is valid.
*
* @param {BidRequest} bid The bid params to validate.
* @return boolean True if this is a valid bid, and false otherwise.
*/
isBidRequestValid: function (bid) {
return !!(bid.params.placementId);
},

/**
* Make a server request from the list of BidRequests.
*
* @return Array Info describing the request to the server.
* @param validBidRequests
* @param bidderRequest
*/
buildRequests: function (validBidRequests, bidderRequest) {
if (validBidRequests.length === 0) {
return [];
}
return validBidRequests.map(bidRequest => {
const sizes = utils.parseSizesInput(bidRequest.sizes)[0];
const size = sizes.split('x');
const jaySupported = 'atob' in window && 'currentScript' in document;
const device = getDevice();
const payload = {
placementId: bidRequest.params.placementId,
width: size[0],
height: size[1],
bidId: bidRequest.bidId,
categories: bidRequest.params.categories,
referer: bidderRequest.refererInfo.referer,
jaySupported: jaySupported,
device: device
};
return {
method: 'POST',
url: ENDPOINT_URL,
data: payload
};
});
},

/**
* Unpack the response from the server into a list of bids.
*
* @param {ServerResponse} serverResponse A successful response from the server.
* @param bidRequest
* @return {Bid[]} An array of bids which were nested inside the server.
*/
interpretResponse: function (serverResponse, bidRequest) {
const bidResponses = [];
const response = serverResponse.body;

response.forEach(function(bid) {
bid.ttl = config.getConfig('_bidderTimeout');
bidResponses.push(bid);
});
return bidResponses;
},
};

function getDevice() {
const ua = navigator.userAgent;
const topWindow = window.top;
if ((/(ipad|xoom|sch-i800|playbook|silk|tablet|kindle)|(android(?!.*mobi))/i).test(ua)) {
return 'tablet';
}
if ((/(smart[-]?tv|hbbtv|appletv|googletv|hdmi|netcast\.tv|viera|nettv|roku|\bdtv\b|sonydtv|inettvbrowser|\btv\b)/i).test(ua)) {
return 'connectedtv';
}
if ((/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Windows\sCE|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/i).test(ua)) {
return 'smartphone';
}
const width = topWindow.innerWidth || topWindow.document.documentElement.clientWidth || topWindow.document.body.clientWidth;
if (width > 320) {
return 'desktop';
}
return 'other';
}

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

**Module Name**: Ablida Bidder Adapter
**Module Type**: Bidder Adapter
**Maintainer**: d.kuster@ablida.de

# Description

Module that connects to Ablida's bidder for bids.

# Test Parameters
```
var adUnits = [
{
code: 'ad-div',
mediaTypes: {
banner: {
sizes: [[300, 250]],
}
},
bids: [
{
bidder: 'ablida',
params: {
placementId: 'mediumrectangle-demo',
categories: ['automotive', 'news-and-politics'] // optional: categories of page
}
}
]
}
];
```
Loading