Prebid Module
Neuwo runs as a real-time data module inside Prebid.js. Before each auction it asks Neuwo what the current page is about, then attaches the IAB content and audience categories to every bid request, so bidders can price the page on its subject rather than on its address.
The whole job is one configuration block and a Prebid build that includes the module. Your ad units do not change and nothing new goes on the page. Four steps, then a check, and the two steps that involve code are copy and paste.
Not sure this is the right route? Choose your integration weighs it against the other two.
Before you start
- Whoever maintains your Prebid setup. They need to be able to change the Prebid.js build and the configuration that goes with it. Nobody has to touch your ad units, your ad server or your page templates.
- The list of domains Prebid runs on. Neuwo answers only the origins it has been told about, so it needs that list before anything will return categories.
- Nothing from Neuwo yet. Step 1 is how to get it.
Step 1: Ask Neuwo for your endpoint and token
Contact Neuwo or email adops@neuwo.ai, and say which domains Prebid runs on. There is no self-service signup, so this is the only way to get access.
Two things come back together:
- An Edge API endpoint URL. This becomes
neuwoApiUrlin Step 3. - An API token. This becomes
neuwoApiToken.
Neuwo adds your domains to its allowed origins at the same time. That part is done on Neuwo's side; there is nothing for you to switch on.
Step 2: Put the module in your Prebid build
Prebid.js only contains the modules it was built with, so the Neuwo one has to be added. Either:
- Tick Neuwo RTD Module on the Prebid.js download page and use the file it builds for you, or
- If you build Prebid yourself, add both of these to your existing module list:
gulp build --modules=rtdModule,neuwoRtdProviderKeep every module you already build with and add these two. rtdModule is
Prebid's real-time data framework and neuwoRtdProvider is Neuwo's part of it,
so neither works without the other.
Step 3: Paste the configuration
Add this block wherever your Prebid configuration lives, alongside the
pbjs.setConfig calls you already have. Paste it as it is, then fill in the two
values from Step 1:
pbjs.setConfig({
realTimeData: {
auctionDelay: 500,
dataProviders: [
{
name: "NeuwoRTDModule",
waitForIt: true,
params: {
neuwoApiUrl: "<Your Neuwo Edge API Endpoint URL>",
neuwoApiToken: "<Your Neuwo API Token>",
},
},
],
},
});That is the whole configuration. Everything else has a sensible default, so nothing more is required to go live.
Two values are worth knowing rather than changing:
auctionDelay is how many milliseconds Prebid waits for Neuwo before starting
the auction, and waitForIt is what makes it wait at all. Set the delay too low
and bid requests go out before the categories are ready. Start at 500 and
leave it there until you have a reason to move it.
Step 4: Publish it
Deploy the new Prebid build and the configuration together. They have to go out in the same release: the configuration names a module that older builds do not contain, and the build does nothing without the configuration.
Check it worked
Open one of your own article pages, open the browser console, paste this in, and reload the page:
pbjs.que.push(function () {
pbjs.onEvent("bidRequested", function (bidRequest) {
console.log(
"Neuwo:",
bidRequest.ortb2?.site?.content?.data?.find((d) => d.name === "www.neuwo.ai")
);
});
});When the next auction runs you should see a www.neuwo.ai entry with a list of
segment IDs. Those are the IAB content categories for that page, and they are
now going out with every bid request.
The first load of a page Neuwo has never seen usually returns nothing. Neuwo queues the page and analyses it, which normally takes 10 to 60 seconds. Reload after that and the categories are there. This is expected, and only happens once per page.
If it did not work
- Nothing logged at all. The module is probably not in the build. Check that
the Prebid file you deployed was built with
neuwoRtdProvider, not just configured for it. - An empty or error response. The domain you are testing on may not be on Neuwo's allowed origins. Send Neuwo the exact domain, subdomain included, and say it is missing.
- Categories arrive too late for the auction. Raise
auctionDelay, and check thatwaitForItis stilltrue. - It works on one site and not another. Each domain has to be on the allowed origins separately.
Still stuck: contact Neuwo or email adops@neuwo.ai, and say which domain you tested and what the console showed.
Tell Neuwo when it is live
Once the categories are showing, let Neuwo know so the setup can be reviewed against real traffic before you rely on it.
After that
- Every parameter, the filtering options and what exactly the module writes into
ortb2: Prebid Module Reference. - Getting the same categories into Google Ad Manager as Publisher Provided Signals: Google Ad Manager (PPS).