The Mantis RTD provider module for Prebid.js enables publishers to enrich ad auction requests with contextual intelligence from the Mantis API. It runs client-side as part of the Prebid RTD framework and injects structured signals — brand safety ratings, sentiment, emotions, and content categories — into OpenRTB (ortb2) objects before bidding occurs, allowing demand partners to make more informed bidding decisions.
positive / negative / neutral / unknown)joy-high, anger-low)GREEN, AMBER, RED)Populates site.content.data and user.data with named segment groups.
auctionDelay — auction is never blocked| Parameter | Type | Required | Description |
|---|---|---|---|
endpoint |
string | yes | Base URL of the Mantis API service |
The API request timeout is controlled by the top-level auctionDelay setting in the realTimeData config. Keep it as low as possible — higher values increase auction latency.
pbjs.setConfig({
realTimeData: {
auctionDelay: 1000, // keep as low as possible for production
dataProviders: [
{
name: 'mantis',
waitForIt: true,
params: {
endpoint: 'https://publisher-mantis.example.com/api/demo'
}
}
]
}
});
All errors fail gracefully with no retries — the auction is never blocked.
| Scenario | Behavior |
|---|---|
Valid config, response within auctionDelay |
Segments injected into ortb2Fragments.global |
Missing endpoint param |
No request made; auction continues immediately |
| Non-2xx response (e.g. 404, 500) | Error logged; no segments added; auction continues |
Response exceeds auctionDelay |
Module stops waiting; auction continues without data |
| Network error (DNS failure, unreachable) | Error logged; no segments added; auction continues |
| Late response (arrives after timeout) | Response discarded; auction already proceeding |
| Empty or below-threshold API data | No segments injected; auction continues normally |
Filter console logs by mantisRtdProvider: to see init, timeout, and error messages. Check the network tab for the GET request to the configured endpoint.