diff --git a/dev-docs/modules/debugging.md b/dev-docs/modules/debugging.md index 2e2d954d56..0f2d00cce5 100644 --- a/dev-docs/modules/debugging.md +++ b/dev-docs/modules/debugging.md @@ -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. @@ -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" + } + }] + }} + } + } + ] + } +}); +```