-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/prebid-5.0' into enforce-floors
- Loading branch information
Showing
58 changed files
with
3,695 additions
and
3,244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
152 changes: 152 additions & 0 deletions
152
integrationExamples/gpt/optimeraRtdProvider_example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.