File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ sidebarType : 1
10
10
---
11
11
12
12
# Debugging module
13
+ {: .no_toc}
14
+
15
+ - TOC
16
+ {: toc }
13
17
14
18
This module allows to "intercept" bids and replace their contents with arbitrary data for the purposes of testing and development.
15
19
@@ -187,3 +191,57 @@ pbjs.setConfig({
187
191
}
188
192
});
189
193
```
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
+ ```
You can’t perform that action at this time.
0 commit comments