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 #27

Merged
merged 43 commits into from
Oct 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e72e2dc
Add RSA validation to Criteo FastBid (#3110)
jsfaure Oct 9, 2018
8fdf61d
Added support for user syncing pixel (#3092)
Oct 9, 2018
a1f07e9
Small bugfix and cleanup for Prebid Server OpenRTB code (#3113)
snapwich Oct 9, 2018
f466b8c
Revert "Adding appnexus debug via cookie/params" (#3164)
mkendall07 Oct 9, 2018
5736e83
add bid ttl to cache call (#3163)
mkendall07 Oct 9, 2018
24dd19a
Render outstream safeframe (#3159)
jaiminpanchal27 Oct 9, 2018
b66e241
Prebid 1.27.0 Release
jsnellbaker Oct 9, 2018
a4d91fd
increment Prebid version
jsnellbaker Oct 9, 2018
7f94928
rubiconBidAdapter - Checking FPD values are defined before toString()…
Oct 9, 2018
18107d8
Adding mediaType param to parseSizes in order to ALWAYS get the corre…
Oct 10, 2018
2903eb0
PubMatic to support DigiTrust Id passing (#3160)
pm-harshad-mane Oct 11, 2018
1e77957
OpenX Adapter: Added support for pubcid (#3158)
lu-ruo Oct 11, 2018
4585a93
use version replace rather than package.json in widespace (#3143)
snapwich Oct 11, 2018
0c53a47
Trafficroots Resubmit (#3141)
cary67 Oct 15, 2018
e530cbb
Rubicon skip video request in mutlti format when video is not setup (…
Oct 15, 2018
cb66860
OpenXOutstream Bid Adapter (#3153)
HolzAndrew Oct 15, 2018
de597ae
improves additional data passed to the handler in AuctionInit and Auc…
Oct 16, 2018
1cdf418
removing cookieSet (#3175)
bretg Oct 16, 2018
8529386
Removed deprecated priceType option (+tests) (#3170)
jtovba Oct 16, 2018
b771e4f
Improve Digital adapter: set dealID based on buying type (#3182)
jbartek25 Oct 16, 2018
bf3137c
disabling tests that are failing in safari (#3186)
jsnellbaker Oct 16, 2018
613d167
Prebid 1.28.0 Release
jaiminpanchal27 Oct 16, 2018
79af988
Increment pre version
jaiminpanchal27 Oct 16, 2018
175a7ca
add a check against the size config when setting targeting (#3183)
snapwich Oct 17, 2018
c238e68
add stub for adloader.loadScript in various adapter test files (#3193)
jsnellbaker Oct 17, 2018
ea96547
fix simon spy.reset deprecation warning
snapwich Oct 17, 2018
73e7014
Stub adloader across the board to prevent requests going out (#3196)
snapwich Oct 17, 2018
a62e088
Add buyer bid adapter (#3200)
avj83 Oct 19, 2018
6879fea
Adlive bid adapter (#3109)
Oct 19, 2018
b8eb55c
Add native support to RTBHouseAdapter (#3189)
Kamoris Oct 19, 2018
86357a8
Ref and meta keyword collection feature (#3184)
ckbo3hrk Oct 19, 2018
3178468
use referrer detection module (#3188)
jsalis Oct 22, 2018
db67744
ZEDO - Updated Documentation (#3192)
skazedo Oct 22, 2018
52b8a77
change domain of sync URL (#3207)
naffis Oct 22, 2018
bf3b3ae
rename buyer to dspx (#3210)
avj83 Oct 22, 2018
14d3031
Fixes #3197 - call auctionDone() when 'No valid bid requests returned…
drdmitry Oct 23, 2018
ebca05a
[Update rexrtbBidAdapter] Update default host (#3217)
prebidRxRTB Oct 23, 2018
47d726a
adds height and width params to request (#3215)
HolzAndrew Oct 23, 2018
b4705e3
Rubicon adapter: Removed extraneous warning (#3218)
bretg Oct 23, 2018
6213708
updates jcsi (#3220)
susyt Oct 23, 2018
a7b143d
Prebid 1.29.0 Release
bretg Oct 23, 2018
8159d40
Increment pre version
bretg Oct 23, 2018
bd3cb66
add proper cleanup to realvu analytics (#3195)
snapwich Oct 23, 2018
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
10 changes: 10 additions & 0 deletions integrationExamples/gpt/pbjs_example_gpt.html
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,16 @@
channelCode: 2264002816, //REQUIRED
dimId: 9 //REQUIRED
}
},
{
bidder: 'openxoutstream',
params: {
unit: '53943996499',
delDomain: 'se-demo-d.openx.net',
publisher_page_url: 'yieldmo.com',
width: '300',
height: '250',
}
}

]
Expand Down
40 changes: 26 additions & 14 deletions modules/adkernelBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { BANNER, VIDEO } from 'src/mediaTypes';
import {registerBidder} from 'src/adapters/bidderFactory';
import find from 'core-js/library/fn/array/find';
import includes from 'core-js/library/fn/array/includes';
import {parse as parseUrl} from 'src/url'

const VIDEO_TARGETING = ['mimes', 'minduration', 'maxduration', 'protocols',
'startdelay', 'linearity', 'boxingallowed', 'playbackmethod', 'delivery',
Expand All @@ -22,13 +23,13 @@ export const spec = {
'zoneId' in bidRequest.params && !isNaN(Number(bidRequest.params.zoneId));
},
buildRequests: function(bidRequests, bidderRequest) {
let impDispatch = dispatchImps(bidRequests);
let impDispatch = dispatchImps(bidRequests, bidderRequest.refererInfo);
const gdprConsent = bidderRequest.gdprConsent;
const auctionId = bidderRequest.auctionId;
const requests = [];
Object.keys(impDispatch).forEach(host => {
Object.keys(impDispatch[host]).forEach(zoneId => {
const request = buildRtbRequest(impDispatch[host][zoneId], auctionId, gdprConsent);
const request = buildRtbRequest(impDispatch[host][zoneId], auctionId, gdprConsent, bidderRequest.refererInfo);
requests.push({
method: 'GET',
url: `${window.location.protocol}//${host}/rtbg`,
Expand Down Expand Up @@ -96,8 +97,9 @@ registerBidder(spec);
/**
* Dispatch impressions by ad network host and zone
*/
function dispatchImps(bidRequests) {
return bidRequests.map(buildImp)
function dispatchImps(bidRequests, refererInfo) {
let secure = (refererInfo && refererInfo.referer.indexOf('https:') === 0);
return bidRequests.map(bidRequest => buildImp(bidRequest, secure))
.reduce((acc, curr, index) => {
let bidRequest = bidRequests[index];
let zoneId = bidRequest.params.zoneId;
Expand All @@ -112,7 +114,7 @@ function dispatchImps(bidRequests) {
/**
* Builds parameters object for single impression
*/
function buildImp(bidRequest) {
function buildImp(bidRequest, secure) {
const imp = {
'id': bidRequest.bidId,
'tagid': bidRequest.adUnitCode
Expand All @@ -137,7 +139,7 @@ function buildImp(bidRequest) {
.forEach(param => imp.video[param] = bidRequest.params.video[param]);
}
}
if (utils.getTopWindowLocation().protocol === 'https:') {
if (secure) {
imp.secure = 1;
}
return imp;
Expand All @@ -149,7 +151,7 @@ function buildImp(bidRequest) {
* @return Array[Array[Number]]
*/
function canonicalizeSizesArray(sizes) {
if (sizes.length == 2 && !utils.isArray(sizes[0])) {
if (sizes.length === 2 && !utils.isArray(sizes[0])) {
return [sizes];
}
return sizes;
Expand All @@ -160,12 +162,14 @@ function canonicalizeSizesArray(sizes) {
* @param imps collection of impressions
* @param auctionId
* @param gdprConsent
* @param refInfo
* @return Object complete rtb request
*/
function buildRtbRequest(imps, auctionId, gdprConsent) {
function buildRtbRequest(imps, auctionId, gdprConsent, refInfo) {
let req = {
'id': auctionId,
'imp': imps,
'site': createSite(),
'site': createSite(refInfo),
'at': 1,
'device': {
'ip': 'caller',
Expand Down Expand Up @@ -197,12 +201,20 @@ function getLanguage() {
/**
* Creates site description object
*/
function createSite() {
var location = utils.getTopWindowLocation();
return {
'domain': location.hostname,
'page': location.href.split('?')[0]
function createSite(refInfo) {
let url = parseUrl(refInfo.referer);
let result = {
'domain': url.hostname,
'page': url.protocol + '://' + url.hostname + url.pathname
};
if (self === top && document.referrer) {
result.ref = document.referrer;
}
let keywords = document.getElementsByTagName('meta')['keywords'];
if (keywords && keywords.content) {
result.keywords = keywords.content;
}
return result;
}

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

const BIDDER_CODE = 'adlive';
const ENDPOINT_URL = 'https://api.publishers.adlive.io/get?pbjs=1';
const CURRENCY = 'USD';
const TIME_TO_LIVE = 360;

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

isBidRequestValid: function(bid) {
return !!(bid.params.hashes && utils.isArray(bid.params.hashes));
},

buildRequests: function(validBidRequests) {
let requests = [];

utils._each(validBidRequests, function(bid) {
requests.push({
method: 'POST',
url: ENDPOINT_URL,
options: {
contentType: 'application/json',
withCredentials: true
},
data: JSON.stringify({
transaction_id: bid.bidId,
hashes: utils.getBidIdParameter('hashes', bid.params)
}),
bidId: bid.bidId
});
});

return requests;
},

interpretResponse: function(serverResponse, bidRequest) {
try {
const response = serverResponse.body;
const bidResponses = [];

utils._each(response, function(bidResponse) {
if (!bidResponse.is_passback) {
bidResponses.push({
requestId: bidRequest.bidId,
cpm: bidResponse.price,
width: bidResponse.size[0],
height: bidResponse.size[1],
creativeId: bidResponse.hash,
currency: CURRENCY,
netRevenue: false,
ttl: TIME_TO_LIVE,
ad: bidResponse.content
});
}
});

return bidResponses;
} catch (err) {
utils.logError(err);
return [];
}
}
};
registerBidder(spec);
28 changes: 28 additions & 0 deletions modules/adliveBidAdapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Overview
```
Module Name: Adlive Bid Adapter
Module Type: Bidder Adapter
Maintainer: traffic@adlive.io
```

# Description
Module that connects to Adlive's server for bids.
Currently module supports only banner mediaType.

# Test Parameters
```
var adUnits = [{
code: '/test/div',
mediaTypes: {
banner: {
sizes: [[300, 250]]
}
},
bids: [{
bidder: 'adlive',
params: {
hashes: ['1e100887dd614b0909bf6c49ba7f69fdd1360437']
}
}]
}];
```
57 changes: 0 additions & 57 deletions modules/appnexusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const VIDEO_TARGETING = ['id', 'mimes', 'minduration', 'maxduration',
'startdelay', 'skippable', 'playback_method', 'frameworks'];
const USER_PARAMS = ['age', 'external_uid', 'segments', 'gender', 'dnt', 'language'];
const APP_DEVICE_PARAMS = ['geo', 'device_id']; // appid is collected separately
const DEBUG_PARAMS = ['enabled', 'dongle', 'member_id', 'debug_timeout'];
const NATIVE_MAPPING = {
body: 'description',
cta: 'ctatext',
Expand Down Expand Up @@ -78,32 +77,6 @@ export const spec = {
};
}

let debugObj = {};
let debugObjParams = {};
const debugCookieName = 'apn_prebid_debug';
const debugCookie = getCookie(debugCookieName) || null;

if (debugCookie) {
try {
debugObj = JSON.parse(debugCookie);
} catch (e) {
utils.logError('AppNexus Debug Auction Cookie Error:\n\n' + e);
}
} else {
const debugBidRequest = find(bidRequests, hasDebug);
if (debugBidRequest && debugBidRequest.debug) {
debugObj = debugBidRequest.debug;
}
}

if (debugObj && debugObj.enabled) {
Object.keys(debugObj)
.filter(param => includes(DEBUG_PARAMS, param))
.forEach(param => {
debugObjParams[param] = debugObj[param];
});
}

const memberIdBid = find(bidRequests, hasMemberId);
const member = memberIdBid ? parseInt(memberIdBid.params.member, 10) : 0;

Expand All @@ -126,11 +99,6 @@ export const spec = {
payload.app = appIdObj;
}

if (debugObjParams.enabled) {
payload.debug = debugObjParams;
utils.logInfo('AppNexus Debug Auction Settings:\n\n' + JSON.stringify(debugObjParams, null, 4));
}

if (bidderRequest && bidderRequest.gdprConsent) {
// note - objects for impbus use underscore instead of camelCase
payload.gdpr_consent = {
Expand Down Expand Up @@ -186,22 +154,6 @@ export const spec = {
}
});
}

if (serverResponse.debug && serverResponse.debug.debug_info) {
let debugHeader = 'AppNexus Debug Auction for Prebid\n\n';
let debugText = debugHeader + serverResponse.debug.debug_info;
debugText = debugText
.replace(/(<td>|<th>)/gm, '\t') // Tables
.replace(/(<\/td>|<\/th>)/gm, '\n') // Tables
.replace(/^<br>/gm, '') // Remove leading <br>
.replace(/(<br>\n|<br>)/gm, '\n') // <br>
.replace(/<h1>(.*)<\/h1>/gm, '\n\n===== $1 =====\n\n') // Header H1
.replace(/<h[2-6]>(.*)<\/h[2-6]>/gm, '\n\n*** $1 ***\n\n') // Headers
.replace(/(<([^>]+)>)/igm, ''); // Remove any other tags
utils.logMessage('AppNexus Debug Auction Glossary: https://wiki.appnexus.com/x/qwmHAg');
utils.logMessage(debugText);
}

return bids;
},

Expand Down Expand Up @@ -477,15 +429,6 @@ function hasAppId(bid) {
return !!bid.params.app
}

function hasDebug(bid) {
return !!bid.debug
}

function getCookie(name) {
let m = window.document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]*)\\s*(;|$)');
return m ? decodeURIComponent(m[2]) : null;
}

function getRtbBid(tag) {
return tag && tag.ads && tag.ads.length && find(tag.ads, ad => ad.rtb);
}
Expand Down
27 changes: 21 additions & 6 deletions modules/beachfrontBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import * as utils from 'src/utils';
import { parse as parseUrl } from 'src/url';
import { config } from 'src/config';
import { registerBidder } from 'src/adapters/bidderFactory';
import { Renderer } from 'src/Renderer';
import { VIDEO, BANNER } from 'src/mediaTypes';
import find from 'core-js/library/fn/array/find';
import includes from 'core-js/library/fn/array/includes';

const ADAPTER_VERSION = '1.3';
const ADAPTER_VERSION = '1.4';
const ADAPTER_NAME = 'BFIO_PREBID';
const OUTSTREAM = 'outstream';

Expand Down Expand Up @@ -237,6 +239,19 @@ function isBannerBidValid(bid) {
return isBannerBid(bid) && getBannerBidParam(bid, 'appId') && getBannerBidParam(bid, 'bidfloor');
}

function getTopWindowLocation(bidderRequest) {
let url = bidderRequest && bidderRequest.refererInfo && bidderRequest.refererInfo.referer;
return parseUrl(config.getConfig('pageUrl') || url, { decodeSearchAsString: true });
}

function getTopWindowReferrer() {
try {
return window.top.document.referrer;
} catch (e) {
return '';
}
}

function getVideoTargetingParams(bid) {
return Object.keys(Object(bid.params.video))
.filter(param => includes(VIDEO_TARGETING, param))
Expand All @@ -252,7 +267,7 @@ function createVideoRequestData(bid, bidderRequest) {
let video = getVideoTargetingParams(bid);
let appId = getVideoBidParam(bid, 'appId');
let bidfloor = getVideoBidParam(bid, 'bidfloor');
let topLocation = utils.getTopWindowLocation();
let topLocation = getTopWindowLocation(bidderRequest);
let payload = {
isPrebid: true,
appId: appId,
Expand Down Expand Up @@ -294,8 +309,8 @@ function createVideoRequestData(bid, bidderRequest) {
}

function createBannerRequestData(bids, bidderRequest) {
let topLocation = utils.getTopWindowLocation();
let referrer = utils.getTopWindowReferrer();
let topLocation = getTopWindowLocation(bidderRequest);
let topReferrer = getTopWindowReferrer();
let slots = bids.map(bid => {
return {
slot: bid.adUnitCode,
Expand All @@ -309,8 +324,8 @@ function createBannerRequestData(bids, bidderRequest) {
page: topLocation.href,
domain: topLocation.hostname,
search: topLocation.search,
secure: topLocation.protocol === 'https:' ? 1 : 0,
referrer: referrer,
secure: topLocation.protocol.indexOf('https') === 0 ? 1 : 0,
referrer: topReferrer,
ua: navigator.userAgent,
deviceOs: getOsVersion(),
isMobile: isMobile() ? 1 : 0,
Expand Down
2 changes: 1 addition & 1 deletion modules/consumableBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const spec = {
if (syncOptions.iframeEnabled) {
return [{
type: 'iframe',
url: '//s.zkcdn.net/ss/' + siteId + '.html'
url: '//sync.serverbid.com/ss/' + siteId + '.html'
}];
} else {
utils.logWarn(bidder + ': Please enable iframe based user syncing.');
Expand Down
Loading