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

Prebid 7: Merge in changes from master #8278

Merged
merged 45 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
15f7ec1
only map one slotrender to one adunit (#8211)
robertrmartinez Mar 28, 2022
7bd0098
DFP Ad Server Video: respect original url (#8168)
karimMourra Mar 29, 2022
4a9ccb8
Admaru adapter : add new bid adapter (#8149)
supadm Mar 29, 2022
972ead0
Missena Bid Adapter - allow custom endpoint. (#8222)
pdamoc Mar 30, 2022
35e46cd
Next Millenium Bid Adapter: Added new parameter group_id (#8200)
mhlm Mar 30, 2022
3015515
add timeout value to timeout pixel (#8224)
ybootin Mar 30, 2022
ca0c0f1
Outbrain bid adapter: added floor module and privacy link support (#8…
markkuhar Mar 30, 2022
d1a816b
Improve Digital Bid adapter: use the oRTB server endpoint (#8138)
jbartek25 Mar 30, 2022
8a7ebfd
NativoBidAdapter - Bid data mapping refactor and added QS params on r…
jsfledd Mar 30, 2022
f79b5b4
Floor price : allow having a 0$ floor (#8239)
JulieLorin Mar 30, 2022
001dcfa
Prebid 6.18.0 release
prebidjs-release Mar 30, 2022
82987c6
Increment version to 6.19.0-pre
prebidjs-release Mar 30, 2022
e87ac61
IAS RTD Module: Custom key values (#8214)
rbarbini-ias Mar 31, 2022
76d29fd
Yieldlab Bid Adapter: Add Support for User Matching (#8148)
nkloeber Mar 31, 2022
f3ce25d
Build system: add option to generate source maps for production build…
dgirardi Mar 31, 2022
cbb9ee4
Gamoshi Bid Adapter: Handle gdpr applies correctly (#8245)
Apr 1, 2022
70cd775
Prebid core: make GDPR/USP consent data available without requiring a…
dgirardi Apr 2, 2022
dfac4ee
add image userSync and change default currency (#8244)
ignat-one Apr 2, 2022
2cf1896
Colossus Bid Adapter: fix buildRequests (#8236)
Apr 2, 2022
02ea759
Yandex Bid Adapter: initial release (#8183)
Saveliev Apr 2, 2022
4a83fff
LiveIntent Id Submodule: Update live-connect build dependency to 2.3.…
3link Apr 2, 2022
f66e347
Adman Bid Adapter: update sync url (#8250)
SmartyAdman Apr 4, 2022
28b4c69
Glimpse: update api and request shape, optimize and refactor (#8237)
eddyu0 Apr 4, 2022
1153c70
Revert "Glimpse: update api and request shape, optimize and refactor …
msm0504 Apr 4, 2022
14cdd2a
Seeding alliance Adapter: multiple replacement of auction price bugfi…
Apr 5, 2022
e2c4086
Biddo Bid Adapter: add new bid adapter (#8206)
llays Apr 5, 2022
147ee96
consumableBidAdapter - add bidResponse fields (#8252)
jpiros Apr 6, 2022
301c0aa
Adtelligent Bid Adapter: add JANet adapter alias (#8102)
GeneGenie Apr 7, 2022
5406273
Add DistroScale Bid Adapter (#8221)
duancg Apr 7, 2022
90b37c1
Prebid 6.19.0 release
prebidjs-release Apr 7, 2022
5530dc1
Increment version to 6.20.0-pre
prebidjs-release Apr 7, 2022
b85ec2e
PulsePoint Bid Adapter: Support for first party eid data (#8215)
anand-venkatraman Apr 7, 2022
30d5cae
video added to nexx360 (#8259)
gchicoye Apr 7, 2022
741538f
justPremium Bid Adapter : support for user sync pixels (#8249)
marcin15g Apr 7, 2022
5b391c0
bump ajv (#8268)
robertrmartinez Apr 8, 2022
fdfa7a2
Glimpse: update api, request shape, GDPR and CCPA, optimize and refac…
eddyu0 Apr 8, 2022
7d42e11
Loglylift Bid Adapter: add support for banners (#8270)
HashimotoLogly Apr 8, 2022
f2ab346
Documentation: PR-reviewer update (#8267)
bretg Apr 11, 2022
930b94d
Permutive RTD module: support IAB Audience taxonomy (#8242)
desbo Apr 11, 2022
81bf1a9
Triplelift Bid Adapter: deprecate getLegacyFpd (#8273)
nllerandi3lift Apr 11, 2022
498e760
appnexus bid adapter - add support for setConfig pageUrl (#8266)
jsnellbaker Apr 11, 2022
c9d7e87
appnexus bid adapter - support mediaTypes pos field (#8275)
jsnellbaker Apr 12, 2022
837105d
Mediasniper bidder adapter (#8199)
OlegRomanenko Apr 12, 2022
a6496f5
JustPremium: documentation update (#8277)
gsroka Apr 12, 2022
2d14b7d
Prebid Core: add documentResolver callback and allow the user to supp…
olafbuitelaar Apr 12, 2022
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
9 changes: 7 additions & 2 deletions PR_REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,16 @@ Follow steps above for general review process. In addition, please verify the fo
- If the adapter being submitted is an alias type, check with the bidder contact that is being aliased to make sure it's allowed.
- All bidder parameter conventions must be followed:
- Video params must be read from AdUnit.mediaTypes.video when available; however bidder config can override the ad unit.
- First party data must be read from [`fpd.context` and `fpd.user`](https://docs.prebid.org/dev-docs/publisher-api-reference.html#setConfig-fpd).
- First party data must be read from [getConfig('ortb2');](https://docs.prebid.org/dev-docs/publisher-api-reference/setConfig.html#setConfig-fpd).
- Adapters that accept a floor parameter must also support the [floors module](https://docs.prebid.org/dev-docs/modules/floors.html) -- look for a call to the `getFloor()` function.
- Adapters cannot accept an schain parameter. Rather, they must look for the schain parameter at bidRequest.schain.
- The bidRequest page referrer must checked in addition to any bidder-specific parameter.
- The bidderRequest.refererInfo.referer must be checked in addition to any bidder-specific parameter.
- If they're getting the COPPA flag, it must come from config.getConfig('coppa');
- Page position must come from bidrequest.mediaTypes.banner.pos or bidrequest.mediaTypes.video.pos
- Global OpenRTB fields should come from [getConfig('ortb2');](https://docs.prebid.org/dev-docs/publisher-api-reference/setConfig.html#setConfig-fpd):
- bcat, battr, badv
- Impression-specific OpenRTB fields should come from bidrequest.ortb2imp
- instl
- Below are some examples of bidder specific updates that should require docs update (in their dev-docs/bidders/BIDDER.md file):
- If they support the GDPR consentManagement module and TCF1, add `gdpr_supported: true`
- If they support the GDPR consentManagement module and TCF2, add `tcf2_supported: true`
Expand Down
24 changes: 18 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ function makeDevpackPkg() {

function makeWebpackPkg() {
var cloned = _.cloneDeep(webpackConfig);
delete cloned.devtool;
if (!argv.sourceMaps) {
delete cloned.devtool;
}

var externalModules = helpers.getArgModules();

Expand All @@ -144,10 +146,19 @@ function makeWebpackPkg() {
return gulp.src([].concat(moduleSources, analyticsSources, 'src/prebid.js'))
.pipe(helpers.nameModules(externalModules))
.pipe(webpackStream(cloned, webpack))
.pipe(gulpif(file => file.basename === 'prebid-core.js', header(banner, { prebid: prebid })))
.pipe(gulp.dest('build/dist'));
}

function addBanner() {
const sm = argv.sourceMaps;

return gulp.src(['build/dist/prebid-core.js'])
.pipe(gulpif(sm, sourcemaps.init({loadMaps: true})))
.pipe(header(banner, {prebid}))
.pipe(gulpif(sm, sourcemaps.write('.')))
.pipe(gulp.dest('build/dist'))
}

function getModulesListToAddInBanner(modules) {
return (modules.length > 0) ? modules.join(', ') : 'All available modules in current version.';
}
Expand All @@ -172,6 +183,7 @@ function nodeBundle(modules) {
function bundle(dev, moduleArr) {
var modules = moduleArr || helpers.getArgModules();
var allModules = helpers.getModuleNames(modules);
const sm = dev || argv.sourceMaps;

if (modules.length === 0) {
modules = allModules.filter(module => explicitModules.indexOf(module) === -1);
Expand Down Expand Up @@ -203,13 +215,13 @@ function bundle(dev, moduleArr) {
)
// Need to uodate the "Modules: ..." section in comment with the current modules list
.pipe(replace(/(Modules: )(.*?)(\*\/)/, ('$1' + getModulesListToAddInBanner(helpers.getArgModules()) + ' $3')))
.pipe(gulpif(dev, sourcemaps.init({ loadMaps: true })))
.pipe(gulpif(sm, sourcemaps.init({ loadMaps: true })))
.pipe(concat(outputFileName))
.pipe(gulpif(!argv.manualEnable, footer('\n<%= global %>.processQueue();', {
global: prebid.globalVarName
}
)))
.pipe(gulpif(dev, sourcemaps.write('.')));
.pipe(gulpif(sm, sourcemaps.write('.')));
}

// Run the unit tests.
Expand Down Expand Up @@ -398,7 +410,7 @@ gulp.task(clean);
gulp.task(escapePostbidConfig);

gulp.task('build-bundle-dev', gulp.series(makeDevpackPkg, gulpBundle.bind(null, true)));
gulp.task('build-bundle-prod', gulp.series(makeWebpackPkg, gulpBundle.bind(null, false)));
gulp.task('build-bundle-prod', gulp.series(makeWebpackPkg, addBanner, gulpBundle.bind(null, false)));

// public tasks (dependencies are needed for each task since they can be ran on their own)
gulp.task('test-only', test);
Expand All @@ -417,7 +429,7 @@ gulp.task('serve-fast', gulp.series(clean, gulp.parallel('build-bundle-dev', wat
gulp.task('serve-and-test', gulp.series(clean, gulp.parallel('build-bundle-dev', watchFast, testTaskMaker({watch: true}))));
gulp.task('serve-fake', gulp.series(clean, gulp.parallel('build-bundle-dev', watch), injectFakeServerEndpointDev, test, startFakeServer));

gulp.task('default', gulp.series(clean, makeWebpackPkg));
gulp.task('default', gulp.series(clean, 'build-bundle-prod'));

gulp.task('e2e-test', gulp.series(clean, setupE2e, gulp.parallel('build-bundle-prod', watch), injectFakeServerEndpoint, test));
// other tasks
Expand Down
29 changes: 22 additions & 7 deletions integrationExamples/gpt/permutiveRtdProvider_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
}
},
bids: [
{
bidder: 'ix',
params: {
siteId: '123456',
}
},
{
bidder: 'appnexus',
params: {
Expand Down Expand Up @@ -135,15 +141,28 @@
pbjs.que.push(function() {
pbjs.setConfig({
debug: true,
pageUrl: 'http://www.test.com/test.html',
realTimeData: {
auctionDelay: 80, // maximum time for RTD modules to respond
dataProviders: [
{
name: 'permutive',
waitForIt: true,
params: {
acBidders: ['appnexus', 'rubicon', 'ozone', 'trustx'],
acBidders: ['appnexus', 'rubicon', 'ozone', 'trustx', 'ix'],
maxSegs: 500,
transformations: [
{
id: 'iab',
config: {
segtax: 4,
iabIds: {
1000001: '777777',
1000002: '888888'
}
}
}
],
overwrites: {
rubicon: function (bid, data, acEnabled, utils, defaultFn) {
if (defaultFn){
Expand All @@ -160,7 +179,7 @@
}
});
pbjs.setBidderConfig({
bidders: ['appnexus', 'rubicon'],
bidders: ['appnexus', 'rubicon', 'ix'],
config: {
ortb2: {
site: {
Expand All @@ -180,13 +199,9 @@
gender: 'm',
keywords: 'a,b',
data: [
{
name: 'www.dataprovider1.com',
ext: { taxonomyname: 'iab_audience_taxonomy' },
segment: [{ id: '687' }, { id: '123' }]
},
{
name: 'permutive.com',
ext: { segtax: 6 },
segment: [{ id: '1' }]
}
]
Expand Down
2 changes: 1 addition & 1 deletion modules/admanBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {config} from '../src/config.js';

const BIDDER_CODE = 'adman';
const AD_URL = 'https://pub.admanmedia.com/?c=o&m=multi';
const URL_SYNC = 'https://pub.admanmedia.com';
const URL_SYNC = 'https://sync.admanmedia.com';

function isBidResponseValid(bid) {
if (!bid.requestId || !bid.cpm || !bid.creativeId ||
Expand Down
81 changes: 81 additions & 0 deletions modules/admaruBidAdapter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER} from '../src/mediaTypes.js';

const ADMARU_ENDPOINT = 'https://p1.admaru.net/AdCall';
const BIDDER_CODE = 'admaru';

const DEFAULT_BID_TTL = 360;

function parseBid(rawBid, currency) {
const bid = {};

bid.cpm = rawBid.price;
bid.impid = rawBid.impid;
bid.requestId = rawBid.impid;
bid.netRevenue = true;
bid.dealId = '';
bid.creativeId = rawBid.crid;
bid.currency = currency;
bid.ad = rawBid.adm;
bid.width = rawBid.w;
bid.height = rawBid.h;
bid.mediaType = BANNER;
bid.ttl = DEFAULT_BID_TTL;

return bid;
}

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

isBidRequestValid: function (bid) {
return !!(bid && bid.params && bid.params.pub_id && bid.params.adspace_id);
},

buildRequests: function (validBidRequests, bidderRequest) {
return validBidRequests.map(bid => {
const payload = {
pub_id: bid.params.pub_id,
adspace_id: bid.params.adspace_id,
bidderRequestId: bid.bidderRequestId,
bidId: bid.bidId
};

return {
method: 'GET',
url: ADMARU_ENDPOINT,
data: payload,
}
})
},

interpretResponse: function (serverResponse, bidRequest) {
const bidResponses = [];
let bid = null;

if (!serverResponse.hasOwnProperty('body') || !serverResponse.body.hasOwnProperty('seatbid')) {
return bidResponses;
}

const serverBody = serverResponse.body;
const seatbid = serverBody.seatbid;

for (let i = 0; i < seatbid.length; i++) {
if (!seatbid[i].hasOwnProperty('bid')) {
continue;
}

const innerBids = seatbid[i].bid;
for (let j = 0; j < innerBids.length; j++) {
bid = parseBid(innerBids[j], serverBody.cur);

bidResponses.push(bid);
}
}

return bidResponses;
}
}

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

```
Module Name: Admaru Bidder Adapter
Module Type: Bidder Adapter
Maintainer: [email protected]
```

# Description

Module that connects to Admaru demand sources

# Test Parameters
```
var adUnits = [
{
code: 'test-div',
mediaTypes: {
banner: {
sizes: [[300, 250]], // a display size
}
},
bids: [
{
bidder: "admaru",
params: {
pub_id: '1234', // string - required
adspace_id: '1234' // string - required
}
}
]
}
];
```
3 changes: 2 additions & 1 deletion modules/adtelligentBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const HOST_GETTERS = {
onefiftytwomedia: () => 'ghb.ads.152media.com',
bidsxchange: () => 'ghb.hbd.bidsxchange.com',
streamkey: () => 'ghb.hb.streamkey.net',
janet: () => 'ghb.bidder.jmgads.com',
}
const getUri = function (bidderCode) {
let bidderWithoutSuffix = bidderCode.split('_')[0];
Expand All @@ -35,7 +36,7 @@ const syncsCache = {};
export const spec = {
code: BIDDER_CODE,
gvlid: 410,
aliases: ['onefiftytwomedia', 'selectmedia', 'appaloosa', 'bidsxchange', 'streamkey',
aliases: ['onefiftytwomedia', 'selectmedia', 'appaloosa', 'bidsxchange', 'streamkey', 'janet',
{ code: 'navelix', gvlid: 380 }
],
supportedMediaTypes: [VIDEO, BANNER],
Expand Down
34 changes: 27 additions & 7 deletions modules/appnexusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import {
logInfo,
logMessage,
logWarn,
transformBidderParamKeywords
transformBidderParamKeywords,
getWindowFromDocument
} from '../src/utils.js';
import {Renderer} from '../src/Renderer.js';
import {config} from '../src/config.js';
Expand Down Expand Up @@ -271,6 +272,10 @@ export const spec = {
rd_ifs: bidderRequest.refererInfo.numIframes,
rd_stk: bidderRequest.refererInfo.stack.map((url) => encodeURIComponent(url)).join(',')
}
let pubPageUrl = config.getConfig('pageUrl');
if (isStr(pubPageUrl) && pubPageUrl !== '') {
refererinfo.rd_can = pubPageUrl;
}
payload.referrer_detection = refererinfo;
}

Expand Down Expand Up @@ -699,7 +704,10 @@ function newBid(serverBid, rtbBid, bidderRequest) {

if (rtbBid.renderer_url) {
const videoBid = find(bidderRequest.bids, bid => bid.bidId === serverBid.uuid);
const rendererOptions = deepAccess(videoBid, 'renderer.options');
let rendererOptions = deepAccess(videoBid, 'mediaTypes.video.renderer.options'); // mediaType definition has preference (shouldn't options be .config?)
if (!rendererOptions) {
rendererOptions = deepAccess(videoBid, 'renderer.options'); // second the adUnit definition has preference (shouldn't options be .config?)
}
bid.renderer = newRenderer(bid.adUnitCode, rtbBid, rendererOptions);
}
break;
Expand Down Expand Up @@ -802,6 +810,13 @@ function bidToTag(bid) {
}
if (bid.params.position) {
tag.position = { 'above': 1, 'below': 2 }[bid.params.position] || 0;
} else {
let mediaTypePos = deepAccess(bid, `mediaTypes.banner.pos`) || deepAccess(bid, `mediaTypes.video.pos`);
// only support unknown, atf, and btf values for position at this time
if (mediaTypePos === 0 || mediaTypePos === 1 || mediaTypePos === 3) {
// ortb spec treats btf === 3, but our system interprets btf === 2; so converting the ortb value here for consistency
tag.position = (mediaTypePos === 3) ? 2 : mediaTypePos;
}
}
if (bid.params.trafficSourceCode) {
tag.traffic_source_code = bid.params.trafficSourceCode;
Expand Down Expand Up @@ -1120,9 +1135,13 @@ function buildNativeRequest(params) {
* @param {string} elementId element id
*/
function hidedfpContainer(elementId) {
var el = document.getElementById(elementId).querySelectorAll("div[id^='google_ads']");
if (el[0]) {
el[0].style.setProperty('display', 'none');
try {
const el = document.getElementById(elementId).querySelectorAll("div[id^='google_ads']");
if (el[0]) {
el[0].style.setProperty('display', 'none');
}
} catch (e) {
// element not found!
}
}

Expand All @@ -1138,12 +1157,13 @@ function hideSASIframe(elementId) {
}
}

function outstreamRender(bid) {
function outstreamRender(bid, doc) {
hidedfpContainer(bid.adUnitCode);
hideSASIframe(bid.adUnitCode);
// push to render queue because ANOutstreamVideo may not be loaded yet
bid.renderer.push(() => {
window.ANOutstreamVideo.renderAd({
const win = getWindowFromDocument(doc) || window;
win.ANOutstreamVideo.renderAd({
tagId: bid.adResponse.tag_id,
sizes: [bid.getSize().split('x')],
targetId: bid.adUnitCode, // target div id to render video
Expand Down
Loading