Skip to content

Commit

Permalink
debugging module: added native example (prebid#5510)
Browse files Browse the repository at this point in the history
* debugging module: added native example

* lint
  • Loading branch information
bretg authored Jul 19, 2024
1 parent 84e0f2c commit 6348a6b
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions dev-docs/modules/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ sidebarType : 1
---

# Debugging module
{: .no_toc}

- TOC
{:toc }

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

Expand Down Expand Up @@ -187,3 +191,57 @@ pbjs.setConfig({
}
});
```
### Force a Native Bid
Note: the native response asset IDs and types must match the request.
```javascript
pbjs.setConfig({
debugging: {
enabled: true,
intercept: [
{
when: {
adUnitCode: "test-div",
bidder: "bidderA"
},
then: {
cpm: 10,
bidder: "bidderA",
mediaType: "native",
source: "client",
currency: "EUR",
cpm: 1.00,
creativeId: "222222",
native: { ortb: {
link: { url: "http://example.com" },
assets: [{
id: 1,
title: { text: "Test Native Creative" }
},{
id: 2,
data: {
type: 2,
value: "Test Description"
}
},{
id: 3,
img: {
type: 3,
url: "https://files.prebid.org/creatives/prebid300x250.png"
}
},{
id: 4,
data: {
type: 1,
value: "Prebid"
}
}]
}}
}
}
]
}
});
```

0 comments on commit 6348a6b

Please sign in to comment.