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 to Prebid 8.26.0 #55

Merged
merged 129 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
ba25f22
Increment version to 8.20.0-pre
prebidjs-release Oct 13, 2023
ea39308
PubmaticBidAdapter: Read and pass gpid from ortb2imp.ext in API call …
pm-priyanka-deshmane Oct 13, 2023
5f0e374
IX Bid Adapter: add EUID abd Criteo to EID allowlist (#10609)
sajidbsk Oct 16, 2023
59cbc9c
Adman Bid Adapter: refactoring gdpr consent string (#10599)
SmartyAdman Oct 16, 2023
665f356
Kargo Bid Adapter: Updates to GPID retrieval (#10618)
jsadwith Oct 17, 2023
20bbae2
Various modules: Received spelling (#10616)
patmmccann Oct 17, 2023
3f6819b
FreeWheel Bid Adapter: support passing content object in config (#10588)
xwang202 Oct 17, 2023
4a3fcf5
Zeta Global SSP Bid Adapter: change required parameters. (#10597)
abermanov-zeta Oct 17, 2023
0dc6240
Bump @babel/traverse from 7.20.1 to 7.23.2 (#10625)
dependabot[bot] Oct 18, 2023
f0f70f3
SmartyadsBidAdapter/add_gvlid (#10626)
rishko00 Oct 18, 2023
52aeed0
Prebid 8.20.0 release
prebidjs-release Oct 19, 2023
b42e337
Increment version to 8.21.0-pre
prebidjs-release Oct 19, 2023
b4296cd
DXKulture Bid Adapter: implementing ORTB conversion library (#10584)
bev-devops Oct 20, 2023
6f778da
Add MediaBrama apater (#10518)
Mediabrama Oct 20, 2023
db9d236
LiveIntent UserId module: update LiveConnect dependency; fix caching …
3link Oct 20, 2023
d0e981b
UID2: support Client-side token generation and build tag (#10510)
jingyi-gao-ttd Oct 23, 2023
6f51f68
Jixie Bid Adapter : support ids extraction based on config object and…
jxdeveloper1 Oct 23, 2023
0a2187c
Bump crypto-js from 3.3.0 to 4.2.0 (#10645)
dependabot[bot] Oct 27, 2023
559206e
Update criteo id system to comply with storage.type (#10630)
leonardlabat Oct 27, 2023
34070eb
UID2 module: Add documentation for cstg (#10629)
jingyi-gao-ttd Oct 27, 2023
24a90d3
PBjs Core : Update RTDs not in .submodules (#10608)
ChrisHuie Oct 27, 2023
f40a324
Yahoo ConnectId - backend sync updates. (#10590)
radubarbos Oct 27, 2023
54e5cb1
Flipp Bid Adapter: add additional check for userKey value, update doc…
mike-lei Oct 27, 2023
838b947
include query string in page parameter (#10644)
snigelweb Oct 27, 2023
f9df72a
use gvlid for showheroes bidder (#10640)
FilipStamenkovic Oct 27, 2023
63214ee
remove coppa getConfig (#10651)
ChrisHuie Oct 27, 2023
ee63e1b
Adagio: adapt video outstream implementation details (#10633)
soupape34 Oct 27, 2023
0a18cdc
Sparteo Bid Adapter: initial release (#10582)
geoffray-viously Oct 27, 2023
fabbbf1
A1media Bid Adpater: resolve AUCTION_PRICE macro (#10624)
ChangsikChoi Oct 27, 2023
6a1fc2e
Connatix Bid Adapter : update PlayerId, CustomerId and Referrer (#10604)
rares-mihai-preda Oct 27, 2023
fb3a6d6
Prebid 8.21.0 release
prebidjs-release Oct 27, 2023
8eff469
Increment version to 8.22.0-pre
prebidjs-release Oct 27, 2023
faff309
Discovery Bid Adapter: add adUnitCode, gpid, and adslot (#10615)
ecoeco163 Oct 27, 2023
0e61728
Programmatica Bid Adapter : initial release (#10598)
Hamper Oct 30, 2023
5bea607
Impactify Bid Adapter : add different mediatypes and manage local sto…
thomasdseao Oct 30, 2023
56292c4
dynamicAdBoostModule: New module (#10377)
adxpremium Oct 30, 2023
a94f7f0
Kargo Bid Adapter: Support for sending ortb2.user.data (#10659)
jsadwith Oct 30, 2023
ae03319
sspBC Bid Adapter: update video detection for VAST4 (#10660)
wojciech-bialy-wpm Oct 30, 2023
2d90b7a
fledgeForGpt: use `imp.ext.ae` instead of `defaultForSlots`; add `pre…
dgirardi Oct 30, 2023
5790fd6
send all bidRequests fields to orbidder and change tests to be more (…
arneschulz1984 Oct 30, 2023
29772f9
Insticator Bid Adapter : get config fix for device (#10667)
ausgomez Oct 31, 2023
9630925
Agma Analytics Adapter: Init (#10642)
steffenmllr Nov 1, 2023
981459b
ADAPTER UPDATES (#10602)
AskRupert-DM Nov 1, 2023
7c25daa
FreeWheel SSP Adapter: add gvlid in spec (#10654)
xwang202 Nov 1, 2023
335697b
openxBidAdapter: add prebid version (#10678)
bwschmidt Nov 2, 2023
3f2cc28
Add size 720x1280 to rubicon adapter (#10676)
harrykingriches Nov 2, 2023
a54c17c
AdMatic Bid Adapter: added native type (#10647)
fatihkaya84 Nov 2, 2023
ef8bec9
Reset Digital Bid Adapter: refactoring usersync method (#10673)
jhon-reset Nov 2, 2023
30ac7f5
Criteo Bid Adapter: Fledge Support (#10665)
vitaliy-pavlenko Nov 2, 2023
534230a
Prebid 8.22.0 release
prebidjs-release Nov 3, 2023
e1384af
Increment version to 8.23.0-pre
prebidjs-release Nov 3, 2023
d74533b
relevantBidAdapter: support s2s (#10610)
hugolm84 Nov 3, 2023
b4598fa
PublinkIdSystem: Pass cached id through for better tracking (#10638)
johnwier Nov 3, 2023
a069331
support for cookie deprecation label (#10695)
jlquaccia Nov 4, 2023
c544100
BLIINK Bid Adapter: hotfix gvlid parameter (#10697)
samous Nov 6, 2023
99d7e71
Tappx Bid Adapter : fixed referrer for iframes using external sites e…
prebidtappx Nov 6, 2023
bb9be09
Mediago Bid Adapter: add imp params for analysis (#10691)
BaronJHYu Nov 6, 2023
87141d4
GoldfishAds Rtd Provider : Initial Module Release (#10623)
keithdoggett Nov 7, 2023
15b523f
ZetaGlobalSsp Analytics Adapter : make event object with only needed …
asurovenko-zeta Nov 7, 2023
5b82e3b
GumGum Bid Adapter: add support for video.plcmt (#10674)
MartinGumGum Nov 7, 2023
680f924
Rubicon Bid Adapter: PAAPI/Fledge support (#10671)
spotxslagle Nov 8, 2023
9595899
feat: pangle support video (#10682)
pangle-fe Nov 8, 2023
ea5bc2c
Rubicon Bid Adapter : send Fastlane cdep flag (#10703)
spotxslagle Nov 8, 2023
9bfd688
Outbrain Bid Adapter - add gpp consent to bid request and User sync c…
markkuhar Nov 9, 2023
51ca28c
Appnexus Bid Adapter - Adding 'adzymic' as a new alias for Appnexus (…
kampungkat Nov 9, 2023
a3c64d4
Consumable Bid Adapter: fix us privacy format and make gpp applicable…
jpiros Nov 9, 2023
b389581
IX Bid Adapter: implement support for exchangeId and externalId [PB-2…
oronno Nov 9, 2023
0154028
Prebid 8.23.0 release
prebidjs-release Nov 9, 2023
7ecec48
Increment version to 8.24.0-pre
prebidjs-release Nov 9, 2023
6667f33
Pubmatic: Contribute vendor details for Prebid server adapter (#10706)
pm-priyanka-deshmane Nov 9, 2023
f2e46d4
priceFloors: Prevent warning when floor price value is 0 (#10701)
PascalSalesch Nov 9, 2023
e3b99f8
Update live-connect-js dependency (#10692)
3link Nov 9, 2023
015f12b
Yieldmo Bid Adapter: Adding tmax to banner bid requests (#10689)
desidiver Nov 9, 2023
fe5fbb7
Discovery Bid Adapter: add bidId, keywords, and pbadslot (#10694)
ecoeco163 Nov 10, 2023
2aadc09
AdagioBidAdapter: fix floor price module support (#10711)
osazos Nov 10, 2023
95a6107
Currency module: better error handling (#10679)
dgirardi Nov 13, 2023
7dbfba4
discovery add refer stack (#10712)
lhxx121 Nov 13, 2023
f50e42c
adstir Bid Adapter: initial release (#10680)
ryohamadaumt Nov 13, 2023
bdd4a40
Criteo bid adapter: add a few missing video fields (#10720)
dzhang-criteo Nov 13, 2023
76e967a
TPMN Bid Adapter: Change End-Point & Support Video (#10611)
tpmn-admin Nov 13, 2023
01654d0
Improve Digital PG flag (#10718)
jbartek25 Nov 13, 2023
af4936a
33Across Analytics Adapter: initial release (#10635)
macinjosh32 Nov 13, 2023
c8870c1
Rubicon Bid Adapter: Pass SUA data if available (#10721)
robertrmartinez Nov 13, 2023
683b5e6
Adttelligent Bid Adapter : add Indicue alias (#10719)
GeneGenie Nov 14, 2023
9c6cd73
Media Filter RTD Provider : initial modul release (#10418)
mcajlakovic Nov 14, 2023
9ce9b50
Onetag Bid Adapter: address auctionId/transactionId leak (#10726)
onetag-dev Nov 14, 2023
83390b9
Use gppApplicableSections and gppString In LiveIntent's Prebid User I…
wi101 Nov 14, 2023
35c6b60
Revert "NoBid Bid Adapter : add support for first party user id (#105…
patmmccann Nov 14, 2023
2691a50
Adagio Analytics Adapter: handle bid cache usecases (#10699)
rotta-f Nov 14, 2023
c027061
Missena Bid Adapter: floor implementation (#10534)
pdamoc Nov 15, 2023
67975d7
FreeWheel SSP Adapter: public vastXml in bidResponse for all media ty…
xwang202 Nov 15, 2023
be9338a
Log unhandled errors and rejections (#10723)
dgirardi Nov 15, 2023
24ff9a6
Doceree AdManager Bid Adapter: initial release (#10684)
Doceree-techStack Nov 15, 2023
31747cf
Operaads Bid Adapter: provide a way to build bid requests for applica…
duduchristian Nov 15, 2023
97d3daa
Ogury Bid Adapter: support userId and userIdAsEids (#10669)
AurelienMozoo Nov 15, 2023
c424d58
Prebid 8.24.0 release
prebidjs-release Nov 16, 2023
055a483
Increment version to 8.25.0-pre
prebidjs-release Nov 16, 2023
879b9be
AsterioBid Analytics Adapter : initial release (#10652)
danoykin Nov 16, 2023
cb9a616
Discovery Bid Adapter : remove duplicate eids (#10743)
ecoeco163 Nov 17, 2023
b7744ec
Adxcg Bid Adapter: use ortbConverter (#10525)
adxcgcom Nov 17, 2023
deff7e0
Core: unify rendering paths; codify (and test) cross-domain render ex…
dgirardi Nov 20, 2023
c9d34ed
feat: Add gvlid to iprom bid adapter (#10750)
iprom-adserver Nov 21, 2023
c8d83f0
ShinezRTB Bid Adapter : initial release (#10405)
saar120 Nov 22, 2023
59532d6
Prebid 8.25.0 release
prebidjs-release Nov 26, 2023
aa73d61
Increment version to 8.26.0-pre
prebidjs-release Nov 26, 2023
1205d53
Criteo bid adapter: Bump fastbid version (#10696)
leonardlabat Nov 26, 2023
656680b
identityLinkIdSystem: include gpp in 3p envelope retrieval (#10745)
mamatic Nov 27, 2023
b1e601a
Taboola Bid Adapter: cast tmax type (#10766)
barRubi Nov 27, 2023
f215abd
adxcg Bid Adapter : fix convertTypes util import (#10763)
lyricwulf Nov 27, 2023
5945465
Boldwin Bid Adapter : update sync url (#10757)
Wls-demo Nov 27, 2023
498b6b5
Onetag Bid Adapter: FLEDGE/PAAPI support (#10755)
onetag-dev Nov 27, 2023
ecf4272
FPD Enrichment: support for Cookie Deprecation Label (#10683)
jlquaccia Nov 27, 2023
8993f74
Currency module: Don't block 'responsesReady' when rates are present …
samuel-palmer-relevant-digital Nov 27, 2023
d21fb7d
ConceptX Bid Adapter : bugfix to avoid appending to the request url o…
cpcpn-emil Nov 28, 2023
6a0c7f0
Grid bid adapter: call data deletion request c2s endpoint (#10732)
vraybaud Nov 28, 2023
4e323bf
SparteoBidAdapter: Send bidder params in OpenRTB request (#10760)
geoffray-viously Nov 28, 2023
1e33758
Impactify Bid Adapter : Removing checks on bid request (#10769)
thomasdseao Nov 28, 2023
1488d8c
Unruly: Protected Audience Support (#10709)
bhainesnexxen Nov 29, 2023
a9b62f8
Relaido Bid Adapter : add userIdAsEids and canonical_url to request (…
relaido Nov 29, 2023
b154fc1
Adagio Bid Adapter: add GPID support (#10775)
osazos Nov 29, 2023
73fb8d3
Core: add option to turn off `Sec-Browsing-Topics` header (#10776)
dgirardi Nov 29, 2023
d70097e
Missena Bid Adapter: add capping support (#10746)
pdamoc Nov 30, 2023
7974ebc
Adnuntius Bid Adaptor: Handle voidAuIds from server response (#10646)
antosarho Nov 30, 2023
32748b4
TPMN Bid Adapter: remove OptionsObject (#10777)
tpmn-admin Nov 30, 2023
7dd09d8
GC-157 Boune request when the PID is missing (#10774)
southern-growthcode Nov 30, 2023
9c597a3
DynamicAdBoost Module : add to adloader list (#10752)
adxpremium Nov 30, 2023
a8fedc6
Generic analytics: fix spurious warning messages (#10739)
dgirardi Nov 30, 2023
5202784
Prebid 8.26.0 release
prebidjs-release Nov 30, 2023
1df7b71
Merge tag '8.26.0' into update-prebid-8.26.0
toshi17 Dec 4, 2023
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
1 change: 0 additions & 1 deletion PR_REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ Follow steps above for general review process. In addition, please verify the fo
- 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 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
Expand Down
3 changes: 2 additions & 1 deletion features.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
"NATIVE",
"VIDEO"
"VIDEO",
"UID2_CSTG"
]
27 changes: 22 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,20 @@ function makeWebpackPkg(extraConfig = {}) {
}
}

function buildCreative() {
return gulp.src(['**/*'])
.pipe(webpackStream(require('./webpack.creative.js')))
.pipe(gulp.dest('build/creative'))
}

function updateCreativeExample(cb) {
const CREATIVE_EXAMPLE = 'integrationExamples/gpt/x-domain/creative.html';
const root = require('node-html-parser').parse(fs.readFileSync(CREATIVE_EXAMPLE));
root.querySelectorAll('script')[0].textContent = fs.readFileSync('build/creative/creative.js')
fs.writeFileSync(CREATIVE_EXAMPLE, root.toString())
cb();
}

function getModulesListToAddInBanner(modules) {
if (!modules || modules.length === helpers.getModuleNames().length) {
return 'All available modules for this version.'
Expand Down Expand Up @@ -405,6 +419,7 @@ function watchTaskMaker(options = {}) {
return function watch(done) {
var mainWatcher = gulp.watch([
'src/**/*.js',
'libraries/**/*.js',
'modules/**/*.js',
].concat(options.alsoWatch));

Expand All @@ -415,8 +430,8 @@ function watchTaskMaker(options = {}) {
}
}

const watch = watchTaskMaker({alsoWatch: ['test/**/*.js'], task: () => gulp.series(clean, gulp.parallel(lint, 'build-bundle-dev', test))});
const watchFast = watchTaskMaker({livereload: false, task: () => gulp.series('build-bundle-dev')});
const watch = watchTaskMaker({alsoWatch: ['test/**/*.js'], task: () => gulp.series(clean, gulp.parallel(lint, 'build-bundle-dev', test, buildCreative))});
const watchFast = watchTaskMaker({livereload: false, task: () => gulp.parallel('build-bundle-dev', buildCreative)});

// support tasks
gulp.task(lint);
Expand Down Expand Up @@ -447,21 +462,23 @@ gulp.task('build-bundle-verbose', gulp.series(makeWebpackPkg({
}
}), gulpBundle.bind(null, false)));

gulp.task('build-creative', gulp.series(buildCreative, updateCreativeExample));

// public tasks (dependencies are needed for each task since they can be ran on their own)
gulp.task('test-only', test);
gulp.task('test-all-features-disabled', testTaskMaker({disableFeatures: require('./features.json'), oneBrowser: 'chrome', watch: false}));
gulp.task('test', gulp.series(clean, lint, gulp.series('test-all-features-disabled', 'test-only')));
gulp.task('test', gulp.series(clean, lint, gulp.parallel('build-creative', gulp.series('test-all-features-disabled', 'test-only'))));

gulp.task('test-coverage', gulp.series(clean, testCoverage));
gulp.task(viewCoverage);

gulp.task('coveralls', gulp.series('test-coverage', coveralls));

gulp.task('build', gulp.series(clean, 'build-bundle-prod'));
gulp.task('build', gulp.series(clean, 'build-bundle-prod', 'build-creative'));
gulp.task('build-postbid', gulp.series(escapePostbidConfig, buildPostbid));

gulp.task('serve', gulp.series(clean, lint, gulp.parallel('build-bundle-dev', watch, test)));
gulp.task('serve-fast', gulp.series(clean, gulp.parallel('build-bundle-dev', watchFast)));
gulp.task('serve-fast', gulp.series(clean, gulp.parallel('build-bundle-dev', buildCreative, watchFast)));
gulp.task('serve-prod', gulp.series(clean, gulp.parallel('build-bundle-prod', startLocalServer)));
gulp.task('serve-and-test', gulp.series(clean, gulp.parallel('build-bundle-dev', watchFast, testTaskMaker({watch: true}))));
gulp.task('serve-e2e', gulp.series(clean, 'build-bundle-prod', gulp.parallel(() => startIntegServer(), startLocalServer)));
Expand Down
168 changes: 168 additions & 0 deletions integrationExamples/gpt/tpmn_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Prebid.js Banner Example</title>
<!-- Prebid.js -->
<!-- <script async src="prebid.js"></script> -->
<script async src="../../build/dev/prebid.js"></script>
<!-- Google Publisher Tag -->
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script>
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
const customConfigObject = {
"buckets": [{
"max": 40,
"increment": 0.5
}]
};
// Prebid Banner Ad Unit
var adUnits = [
{
// Banner adUnit
code: 'banner-div-0',
mediaTypes: {
banner: {
sizes: [[300, 250]],
battr: []
}
},
bids: [{
bidder: 'tpmn',
params: {
inventoryId: 2,
bidFloor: 0.1,
}
}]
},
{
// Video adUnit
code: 'video-div-1',
mediaTypes: {
video: {
context: 'outstream',
playerSize: [640, 480],
mimes: ['video/mp4'],
//playbackmethod: [2, 4, 6],
api: [1, 2, 4, 6],
protocols: [3, 4, 7, 8, 10],
placement: 1,
minduration: 0,
maxduration: 60,
startdelay: 0,
skip: 1
},
},
bids: [{
bidder: 'tpmn',
params: {
inventoryId: 2,
bidFloor: 2.0,
}
}],
renderer: {
options: {
adText : "TPMN Ad",
disableCollapse : true
}
}
}
];
</script>
<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function () {
googletag.pubads().disableInitialLoad();
});

pbjs.que.push(function () {
pbjs.setConfig({
debug: true,
enableSendAllBids: false,
priceGranularity: customConfigObject,
userSync: {
userIds: [{
name: "pubCommonId",
storage: {
name: "pubcid",
type: "cookie",
days: 30
}
},{
name: "unifiedId",
storage: {
type: "cookie",
name: "unifiedid",
expires: 60
}
}],
userIdAsEids: true
}
});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({ bidsBackHandler: sendAdServerRequest });
});

function sendAdServerRequest() {
if (pbjs.adserverRequestSent) return;

//Google Ad Server Use Banner
googletag.cmd.push(() => {
googletag
.defineSlot('/19968336/header-bid-tag-0', [300, 250], 'banner-div-0')
.addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});

//Direct Rendering Video
var highestCpmBids = pbjs.getHighestCpmBids('video-div-1');
console.log("highestCpmBids", highestCpmBids);
if (highestCpmBids.length) {
var doc = document.getElementById('video-div-1');
console.log("highestCpmBids[0].adId", highestCpmBids[0].adId);
pbjs.renderAd(doc, highestCpmBids[0].adId);
}

// googletag.cmd.push(() => {
// googletag
// .defineSlot('/19968336/header-bid-tag-0', [640, 480], 'video-div-1')
// .addService(googletag.pubads());
// googletag.pubads().enableSingleRequest();
// googletag.enableServices();
// });

googletag.cmd.push(function () {
pbjs.que.push(function () {
const adUnitCodes = adUnits.map(adUnit => adUnit.code);
pbjs.setTargetingForGPTAsync(adUnitCodes);
googletag.pubads().refresh();
});
});
}
</script>

</head>
<body>
<h2>Prebid.js TPMN Banner Example</h2>
<div id='banner-div-0'>
<script>
googletag.cmd.push(function () {
googletag.display('banner-div-0');
});
</script>
</div>
<br>
<h2>Prebid.js TPMN Video Example</h2>
<div id='video-div-1' style="width: 640px; height: 480px;">
<script>
googletag.cmd.push(function () {
googletag.display('video-div-1');
});
</script>
</div>
<br>
<div id="targeting-keys"></div>
</body>
121 changes: 121 additions & 0 deletions integrationExamples/gpt/tpmn_serverless_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<!--
This page runs an auction for 2 adunits, simply displaying the results
rather than sending targeting to an ad server.

Notes:

- this approach assumes that the adunit.code is the div name. There
are many other ways to match the adunit to the div.
- this approach won't work for refreshed adunits. For that scenario
you'll need to be more surgical about what's passed into the bidsbackhandler.
- there's not a separate failsafe timeout here. Since there's no call to
an ad server waiting impatiently, Prebid's the only ad game in town and its
timeout is sufficient.
-->

<html>
<head>
<script>
var adUnits = [
{
// Banner adUnit
code: 'banner-div-0',
mediaTypes: {
banner: {
sizes: [[300, 250]],
battr: []
}
},
bids: [{
bidder: 'tpmn',
params: {
inventoryId: 2,
bidFloor: 0.1,
}
}]
},
{
// Video adUnit
code: 'video-div-1',
mediaTypes: {
video: {
context: 'outstream',
playerSize: [640, 480],
mimes: ['video/mp4'],
playbackmethod: [2, 4, 6],
api: [1, 2, 4, 6],
protocols: [3, 4, 7, 8, 10],
placement: 1,
minduration: 0,
maxduration: 60,
startdelay: 0,
skip: 1
},
},
bids: [{
bidder: 'tpmn',
params: {
inventoryId: 2,
bidFloor: 2.0,
}
}],
renderer: {
options: {
adText : "TPMN Ad",
disableCollapse : true
}
}
}
];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
</script>
<script async src="../../build/dev/prebid.js"></script>

<script>
pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
});

// you could instead pass an array of adUnits
// to getHighestCpmBids() if desired
function renderAllAdUnits() {
var winners=pbjs.getHighestCpmBids();
for (var i = 0; i < winners.length; i++) {
renderOne(winners[i]);
}
}

function renderOne(winningBid) {
if (winningBid && winningBid.adId) {
var div = document.getElementById(winningBid.adUnitCode);
if (div) {
let iframe = document.createElement('iframe');
iframe.frameBorder = '0';
div.appendChild(iframe);
var iframeDoc = iframe.contentWindow.document;
pbjs.renderAd(iframeDoc, winningBid.adId);
}
}
}
</script>

<script>
pbjs.que.push(function() {
pbjs.requestBids({
timeout: 2000,
bidsBackHandler: renderAllAdUnits
});
});
</script>
</head>

<body>
<h2>Ad Serverless Test Page</h2>

<div id='banner-div-0'></div>
<br/>
<div id='video-div-1' style="width: 640px; height: 480px;"></div>
</body>
</html>
Loading