This document explains how to access and use NewsPassID’s Prebid Server into your existing Prebid.js (pbjs) stack on your website without using the HTL BID publisher ad tech code management system.
To implement this integration publishers must be a member of the Local Media Consortium (LMC), have a website with Prebid.js already installed, have edit access for Prebid.js integration (and the ability to add and manage header bidder placement IDs in their self-hosted Prebid config).
For publishers managing their own Prebid it is also recommended to visit the Prebid Server Adapter page in the Prebid docs.
In addition to the technical elements of the integration, participating LMC publishers have the option to choose the business model:
- Rev-share: This means the bidder IDs will be provided by the NPID operator (Aditude/HTL) and bid requests are routed through the NPID operator’s demand seats (I.e. “programmatic placement IDs” from DSPs and SSPs).
- SaaS: This means the bidder IDs will be retrieved from the publisher’s seats/accounts with DSPs and SSPs. The publisher pays a usage feed based on requests to NPID Prebid Server.
With either business model, publishers will need to provide Aditude/HTL or its demand sources with its ad map in order to generate ID load sheets. Aditude/HTL can help with this as needed.
Technical Integration Details
- Publishers will need to add the Prebid Server SSP IDs that will be used for Prebid Server into your their Prebid code/structure.
Please note that choosing which DSPs and SSPs to run in the NPID server is an important part of the onboarding process. Please contact NewsPassID or Aditude/HTL if you need help selecting which demand sources to run.
- Add Prebid Server bid adapter, the NPID Prebid Server endpoints, account ID and bidders list. Publishers will need to build in the Prebid Server adapter available here.
1. Adding the Prebid Server SSP IDs into the Prebid code
Depending on the business model, the publisher or HTL/Aditude will provide a file with the Prebid IDs for the SSPs that need to be added to your Prebid configuration. These SSPs and IDs will be used through NPID’s Prebid Server, but they need to be included in your current pbjs
config.
Adding the IDs should be done the same way as Prebid Client. The only difference is that these IDs will run through Prebid Server as long as the bidder is listed in the array in the s2s config in next section.
Example:
var adUnits = [{
code: '/12345/testunit',
mediaTypes: {
banner: {
sizes: [[300, 250], [300,600]]
}
},
bids: [{
// Add the Prebid Server IDs
bidder: 'appnexus',
params: {
placementId: 13144370
},
bidder: "rubicon",
params: {
accountId: 14062,
siteId: 70608,
zoneId: 498816
}
}]
}];
2. Adding the s2sConfig
, NPID Endpoints, Account ID and Bidders List
To call the NPID PBS instance, you need to update and add the following code below as high up the page as possible before bid requests are made. the following in your pbjs
config within the s2sConfig
:
- Add the endpoints:
- NPID Endpoint:
https://npidpbs.com/openrtb2/auction
- NPID Sync Endpoint:
https://npidpbs.com/cookie_sync
- Account ID: Please request this from your contact at the NPID operator, Aditude/HTL
- Bidders: Include the list of bidders that will run through Prebid Server. Please update the
bidders
array with a list of bidders provided to you in the document in step 2. This is only needed if you also run other bidders client side in PBJS.
Example:
window.pbjs = window.pbjs || { cmd: [] };
window.pbjs.cmd = window.pbjs.cmd || [];
window.pbjs.cmd.push(() => {
window.pbjs.setConfig({
s2sConfig: {
accountId: '1001', // replace this with your accountId
enabled: true,
bidders: ['PLACE', 'BIDDERS', 'HERE'], // update this with the list of bidders you're using for NPID
endpoint: 'https://npidpbs.com/openrtb2/auction',
syncEndpoint: 'https://npidpbs.com/cookie_sync',
timeout: 3000
}
});
});
Note: If implementing in AMP (Accelerated Mobile Pages), please reach out to your account manager for additional configuration information.