Skip to content

Commit 6348a6b

Browse files
authored
debugging module: added native example (prebid#5510)
* debugging module: added native example * lint
1 parent 84e0f2c commit 6348a6b

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

dev-docs/modules/debugging.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ sidebarType : 1
1010
---
1111

1212
# Debugging module
13+
{: .no_toc}
14+
15+
- TOC
16+
{:toc }
1317

1418
This module allows to "intercept" bids and replace their contents with arbitrary data for the purposes of testing and development.
1519

@@ -187,3 +191,57 @@ pbjs.setConfig({
187191
}
188192
});
189193
```
194+
195+
### Force a Native Bid
196+
197+
Note: the native response asset IDs and types must match the request.
198+
199+
```javascript
200+
pbjs.setConfig({
201+
debugging: {
202+
enabled: true,
203+
intercept: [
204+
{
205+
when: {
206+
adUnitCode: "test-div",
207+
bidder: "bidderA"
208+
},
209+
then: {
210+
cpm: 10,
211+
bidder: "bidderA",
212+
mediaType: "native",
213+
source: "client",
214+
currency: "EUR",
215+
cpm: 1.00,
216+
creativeId: "222222",
217+
native: { ortb: {
218+
link: { url: "http://example.com" },
219+
assets: [{
220+
id: 1,
221+
title: { text: "Test Native Creative" }
222+
},{
223+
id: 2,
224+
data: {
225+
type: 2,
226+
value: "Test Description"
227+
}
228+
},{
229+
id: 3,
230+
img: {
231+
type: 3,
232+
url: "https://files.prebid.org/creatives/prebid300x250.png"
233+
}
234+
},{
235+
id: 4,
236+
data: {
237+
type: 1,
238+
value: "Prebid"
239+
}
240+
}]
241+
}}
242+
}
243+
}
244+
]
245+
}
246+
});
247+
```

0 commit comments

Comments
 (0)