Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/prebid-5.0' into enforce-floors
Browse files Browse the repository at this point in the history
  • Loading branch information
patmmccann committed Jun 8, 2021
2 parents 4ccda62 + c8058a6 commit ce1f527
Show file tree
Hide file tree
Showing 58 changed files with 3,695 additions and 3,244 deletions.
12 changes: 1 addition & 11 deletions integrationExamples/gpt/idImportLibrary_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,7 @@
expires: 30
}
},
{
name: "sharedId",
params: {
syncTime: 60 // in seconds, default is 24 hours
},
storage: {
type: "html5",
name: "sharedid",
expires: 28
}
} , {
{
name: "liveIntentId",
params: {
publisherId: "9896876"
Expand Down
152 changes: 152 additions & 0 deletions integrationExamples/gpt/optimeraRtdProvider_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
<!DOCTYPE html>
<html lang="en">

<head>
<link rel="icon" type="image/png" href="/favicon.png">
<script async src="//securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<script type="text/javascript" src="../../build/dev/prebid.js" async></script>

<title>Optimera RTD Example</title>

<!-- Prebid Config Section START -->
<script>
var PREBID_TIMEOUT = 1000;
var FAILSAFE_TIMEOUT = 3000;

var div_1_sizes = [
[300, 250],
[300, 600]
];
var div_2_sizes = [
[728, 90],
[970, 250]
];

var adUnits = [{
code: 'div-1',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '13144370'
}
}]
}, {
code: 'div-0',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '13144370'
}
}]
}];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

pbjs.que.push(function () {
pbjs.setConfig({
debug: 'true',
realTimeData: {
dataProviders: [
{
name: 'optimeraRTD',
waitForIt: true,
params: {
clientID: '9999',
optimeraKeyName: 'optimera'
}
}
]
}
});
});

</script>
<!-- Prebid Config Section END -->

<script>
// ======== DO NOT EDIT BELOW THIS LINE =========== //
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: initAdserver,
timeout: PREBID_TIMEOUT
});
});

function initAdserver() {
if (pbjs.initAdserverSet) return;
pbjs.initAdserverSet = true;
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}
// in case PBJS doesn't load
setTimeout(function() {
initAdserver();
}, FAILSAFE_TIMEOUT);

googletag.cmd.push(function() {
googletag.defineSlot('/19968336/header-bid-tag-0', div_1_sizes, 'div-1').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/19968336/header-bid-tag-1', div_2_sizes, 'div-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});

</script>

</head>

<body>
<h2>Basic Prebid.js Example</h2>
<h5>Div-1</h5>
<div id='div-1'>
<script type='text/javascript'>
googletag.cmd.push(function() {
googletag.display('div-1');
});

</script>
</div>

<br>

<h5>Div-0</h5>
<div id='div-0'>
<script type='text/javascript'>
googletag.cmd.push(function() {
googletag.display('div-0');
});

</script>
</div>

</body>

</html>
14 changes: 1 addition & 13 deletions integrationExamples/gpt/userId_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"131": true, // id5Id
"929": true, // parrableId
"97": true, // identityLink
"887": true, // sharedId, uid2
"887": true, // uid2
"95": true, // lotamePanoramaId
"301": true, // zeotapIdPlus
"91": true, // criteo
Expand Down Expand Up @@ -195,18 +195,6 @@
"expires": 30
}
},
{
"name": "sharedId",
// bidders: ["rubicon", "sampleBidders"], // to allow this ID for specific bidders
"params": {
"syncTime": 60 // in seconds, default is 24 hours
},
"storage": {
"type": "cookie",
"name": "sharedid",
"expires": 28
}
},
{
"name": "lotamePanoramaId"
},
Expand Down
1 change: 1 addition & 0 deletions modules/.submodules.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"geoedgeRtdProvider",
"haloRtdProvider",
"jwplayerRtdProvider",
"optimeraRtdProvider",
"permutiveRtdProvider",
"reconciliationRtdProvider",
"sirdataRtdProvider"
Expand Down
13 changes: 1 addition & 12 deletions modules/betweenBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {registerBidder} from '../src/adapters/bidderFactory.js';
import { getAdUnitSizes, parseSizesInput, deepAccess } from '../src/utils.js';
import { getAdUnitSizes, parseSizesInput } from '../src/utils.js';
import { getRefererInfo } from '../src/refererDetection.js';

const BIDDER_CODE = 'between';
Expand Down Expand Up @@ -37,8 +37,6 @@ export const spec = {
tz: getTz(),
fl: getFl(),
rr: getRr(),
shid: getSharedId(i)('id'),
shid3: getSharedId(i)('third'),
s: i.params.s,
bidid: i.bidId,
transactionid: i.transactionId,
Expand Down Expand Up @@ -149,15 +147,6 @@ export const spec = {
}
}

function getSharedId(bid) {
const id = deepAccess(bid, 'userId.sharedid.id');
const third = deepAccess(bid, 'userId.sharedid.third');
return function(kind) {
if (kind === 'id') return id || '';
return third || '';
}
}

function getRr() {
try {
var td = top.document;
Expand Down
6 changes: 3 additions & 3 deletions modules/buzzoolaBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as utils from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER, VIDEO} from '../src/mediaTypes.js';
import {BANNER, VIDEO, NATIVE} from '../src/mediaTypes.js';
import {Renderer} from '../src/Renderer.js';
import {OUTSTREAM} from '../src/video.js';

Expand All @@ -11,7 +11,7 @@ const RENDERER_SRC = 'https://tube.buzzoola.com/new/build/buzzlibrary.js';
export const spec = {
code: BIDDER_CODE,
aliases: ['buzzoolaAdapter'],
supportedMediaTypes: [BANNER, VIDEO],
supportedMediaTypes: [BANNER, VIDEO, NATIVE],

/**
* Determines whether or not the given bid request is valid.
Expand All @@ -21,7 +21,7 @@ export const spec = {
*/
isBidRequestValid: function (bid) {
let types = bid.mediaTypes;
return !!(bid && bid.mediaTypes && (types.banner || types.video) && bid.params && bid.params.placementId);
return !!(bid && bid.mediaTypes && (types.banner || types.video || types.native) && bid.params && bid.params.placementId);
},

/**
Expand Down
42 changes: 40 additions & 2 deletions modules/buzzoolaBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var adUnits = [
bids: [{
bidder: 'buzzoola',
params: {
placementId: 417846
placementId: 417845
}
}]
},
Expand All @@ -45,7 +45,7 @@ var adUnits = [
bids: [{
bidder: 'buzzoola',
params: {
placementId: 417845
placementId: 417846
}
}]
},
Expand All @@ -67,6 +67,44 @@ var adUnits = [
placementId: 417845
}
}]
},
// Native adUnit
{
code: '/21737252144/prebid_test_native',
mediaTypes: {
native: {
image: {
required: true,
sizes: [640, 134]
},
title: {
required: true,
len: 80
},
sponsoredBy: {
required: true
},
clickUrl: {
required: true
},
privacyLink: {
required: false
},
body: {
required: true
},
icon: {
required: true,
sizes: [50, 50]
}
}
},
bids: [{
bidder: 'buzzoola',
params: {
placementId: 417845
}
}]
}
];
```
1 change: 0 additions & 1 deletion modules/districtmDMXBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export const spec = {
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.lotamePanoramaId`), 'lotame.com', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.parrableId`), 'parrable.com', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.netId`), 'netid.de', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.sharedid`), 'sharedid.org', 1);
dmxRequest.user = dmxRequest.user || {};
dmxRequest.user.ext = dmxRequest.user.ext || {};
dmxRequest.user.ext.eids = eids;
Expand Down
Loading

0 comments on commit ce1f527

Please sign in to comment.