Skip to content

Commit f7c3b65

Browse files
Basic example with debugging module instead of AppNexus placement (prebid#5995)
* Basic example with debugging module instead of AppNexus placement Fix issue : prebid#5614 * Update dev-docs/examples/intercept-banner-not-for-prod.js Co-authored-by: Muki Seiler <[email protected]> * Update dev-docs/examples/basic-example.md Co-authored-by: Muki Seiler <[email protected]> * Update dev-docs/examples/intercept-banner-not-for-prod.js --------- Co-authored-by: Muki Seiler <[email protected]>
1 parent fdac1d7 commit f7c3b65

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

dev-docs/examples/basic-example.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ pid: 10
1616

1717
## Basic Prebid.js Example
1818

19-
{% capture htmlCodePrebid %}<h5>Div-1</h5>
19+
{% capture htmlCodePrebid %}
20+
<!-- DO NOT add this script in prod -->
21+
<script src="intercept-banner-not-for-prod.js" ></script>
22+
<!-- END -->
23+
24+
<h5>Div-1</h5>
2025
<div id='div-1' style="min-height:250px;">
2126
<script type='text/javascript'>
2227
googletag.cmd.push(function() {
@@ -26,7 +31,8 @@ pid: 10
2631
</div>
2732
{% endcapture %}
2833

29-
{% capture jsCode %}var sizes = [
34+
{% capture jsCode %}
35+
var sizes = [
3036
[300, 250]
3137
];
3238
var PREBID_TIMEOUT = 700;
@@ -41,7 +47,7 @@ var adUnits = [{
4147
bids: [{
4248
bidder: 'appnexus',
4349
params: {
44-
placementId: 13144370
50+
placementId: 'XXXXXXX' //not used in prod
4551
}
4652
}]
4753
}];
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
window.pbjs = window.pbjs || { que: [] };
2+
pbjs.que.push(() => {
3+
pbjs.setConfig({
4+
debugging: {
5+
enabled: true,
6+
intercept: [{
7+
when: {
8+
bidder: 'appnexus',
9+
},
10+
then: {
11+
ad: '<html><body><img src="https://files.prebid.org/creatives/prebid300x250.png" width="300" height="250" /></body></html>'
12+
}
13+
}]
14+
}
15+
})
16+
})

0 commit comments

Comments
 (0)