Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 9 additions & 3 deletions dev-docs/examples/basic-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ pid: 10

## Basic Prebid.js Example

{% capture htmlCodePrebid %}<h5>Div-1</h5>
{% capture htmlCodePrebid %}
<!-- DO NOT add this script in prod -->
<script src="intercept-banner-not-for-prod.js" ></script>
<!-- END -->

<h5>Div-1</h5>
<div id='div-1' style="min-height:250px;">
<script type='text/javascript'>
googletag.cmd.push(function() {
Expand All @@ -26,7 +31,8 @@ pid: 10
</div>
{% endcapture %}

{% capture jsCode %}var sizes = [
{% capture jsCode %}
var sizes = [
[300, 250]
];
var PREBID_TIMEOUT = 700;
Expand All @@ -41,7 +47,7 @@ var adUnits = [{
bids: [{
bidder: 'appnexus',
params: {
placementId: 13144370
placementId: 'XXXXXXX' //not used in prod
}
}]
}];
Expand Down
16 changes: 16 additions & 0 deletions dev-docs/examples/intercept-banner-not-for-prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
window.pbjs = window.pbjs || { que: [] };
pbjs.que.push(() => {
pbjs.setConfig({
Comment thread
lpagnypubstack marked this conversation as resolved.
debugging: {
enabled: true,
intercept: [{
when: {
bidder: 'appnexus',
},
then: {
ad: '<html><body><img src="https://files.prebid.org/creatives/prebid300x250.png" width="300" height="250" /></body></html>'
}
}]
}
})
})