In this article
This article explains the Prebid Server setup with Equativ as a bidder.
For the setup of Prebid.js read the following articles:
Overview
Prebid Server allows for server-side header bidding with Prebid.js, Prebid Mobile, and Prebid for AMP. Thanks to this solution you can run header bidding auctions server-side, which considerably improves the page load time. Prebid Server solution allows for better on-page user experience and scaling up of your demand partners without imposing latency problems.
Integration types
The table below indicates if this article is relevant for your type of integration with Equativ.
Prebid server vs. Prebid js
Prebid.js allows you to perform auctions in the header of your website. When you're using this solution, an ad call is sent to each bidder, and the bids are sent back to Prebid.js. The winner is determined in the header.
Prebid Server users Prebid js implemented in the header of your website. In this solution one ad call is sent by Prebid.js to the Prebid Server, which then sends bid requests to all bidders. Then bidders send back their bids to the Prebid Server. The auction process takes place server-side, and Prebid Server sends the winner information to Prebid.js.
To learn more, see the official Prebid documentation:
Client-side setup
Prior to the activation of Prebid Server, make sure you have the appropriate contract with Equativ signed, as well as an up-and-ready header bidding wrapper implemented on your website, i.e. you need to download the prebid.js with
Prebid Server from the list of the available bidders. Also there is no need to include the bidder adapters (i.e. the Equativ client-side adapter).
Note: There is no need to integrate any Equativ-related code (i.e. smart.js) on your website.
Equativ's Prebid Server adapter
Our Equativ Prebid Server adapter is available in the
release 0.117.0 of Prebid Server. If you are hosting your own Prebid Server instance, you need to update this version. If you are using a hosted solution, then most likely Equativ bidder adapter is already included.
Prebid Server endpoint is using the same Server Side Bidding endpoint as the other wrappers (e.g: Google OB, Amazon TAM). However, our Prebid Server adapter is configured to support additional targeting capabilities.
Feature | Google OB / Amazon TAM | Prebid Server |
---|
Templating | No templates | No templates |
Insertions | No insertions | No insertions |
Inventory mapping | No inventory mapping (e.g: -1) | SiteID, PageID, FormatID, NetworkID can be used (for reporting, delivery rules, deals) |
Supported parameters
The parameters that are specific to Equativ must be provided in the bidder configuration. The standard OpenRTB parameters (e.g: the video object) must be kept at the adunit-level configuration.
Name | Type | Description | Example | Usage |
---|
networkId | integer | The network ID. | 1234 | required |
siteId | integer | The placement site ID. | 1234 | Optional, but must be filled along with pageId and formatId. |
pageId | integer | The placement page ID. | 1234 | Optional, but must be filled along with siteId and formatId. |
formatId | integer | The placement format ID. | 1234 | Optional, but must be filled along with siteId and pageId. |
target | string | Keyword targeting. | 'sport=tennis' | Available, but requires activation: reach out to your contact at Equativ to have it enabled. |
Display inventory
Configuration
1. You need to configure the
s2sconfig of prebid.js and declare the bidders that Prebid Server will request:
pbjs.setConfig({
s2sConfig: {
accountId: '1', // Obtained from whoever’s hosting the Prebid Server instance
enabled: true,
bidders: ['smartadserver'], // Enable Equativ s2s bidder
timeout: 1000, // This should be approximately 200ms-300ms less than the prebid.js timeout
adapter: 'prebidServer',
endpoint: 'https://prebid.adnxs.com/pbs/v1/auction', // Defines the auction endpoint for the Prebid Server instance (here it is Appnexus)
syncEndpoint: 'https://prebid.adnxs.com/pbs/v1/cookie_sync', // Defines the sync endpoint for the Prebid Server instance (here it is Appnexus)
}
});
2. Then you need to configure the Equativ adapter:
- either directly in s2sConfig.adapterOptions
adapterOptions: {
smartadserver: { key: 'value' }
},
- or as any standard client-side adUnits bidder configuration (s2sConfig.enabled: true will automatically send the request to Equativ from the server-to-server pipeline)
bids: [{
bidder: 'smartadserver',
params: {
key: 'value'
}
}]
When the page is loaded, the calls will be made automatically through Prebid Server. You can verify that by adding
?pbjs_debug=true in the URL
Prebid MESSAGE: CALLING S2S HEADER BIDDERS ==== smartadserver
Example
Below you can see a sample of a test page with the following components:
- prebid.js 3.23.0
- banner adUnit 300x250
- Bidders
- Prebid Server
- Equativ (Smart) to see that we can simply switch from client-side to server-side calls
<!-- PREBID CONFIGURATION -->
<script src='./prebid3.23.0.js'></script>
<script>
var PREBID_TIMEOUT = 1000;
var adUnits = [{
code: '300x250',
mediaTypes: {banner: {sizes: [[300, 250]]}},
bids: [
{
bidder: 'smartadserver',
params: {networkId: 458, siteId: 317777, pageId: 1143112, formatId: 84313}
}]
}
];
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
</script>
<!-- PREBID CONFIGURATION END -->
Video inventory
Prebid Server can be used to send a video (instream/outstream) bidRequest and Equativ to respond with a VAST admarkup. The same Equativ-specific parameters will be used to target the networkId and, optionally, the placement (siteId, pageId, formatId). For all video-specific parameters, you need to add those at the adUnit level.
Configuration
You need to follow the steps described above for the
Display inventory configuration, i.e. the steps 1 and 2.
Finally, you need to add the video parameters at the adUnit level.
adUnits = [{
code: '400x600',
mediaTypes: {
video: {
context: 'instream', // or 'outstream'
mimes: ['video/mp4'],
playerSize: [400, 600],
protocols: [1, 2],
startdelay: 2,
placement: 1
// other OpenRTB video parameters
}
},
[...]
When the page is loaded, the calls will be made automatically through Prebid Server. You can verify that by adding
?pbjs_debug=true in the URL
Prebid MESSAGE: CALLING S2S HEADER BIDDERS ==== smartadserver
Example
Below you can see a sample of a test page with the following components:
- prebid.js 3.23.0
- video adUnit 400x600
- Bidders
- Prebid Server
- Equativ (Smart) to see that we can simply switch from client-side to server-side calls
<!-- PREBID CONFIGURATION -->
<script src='./prebid3.23.0.js'></script>
<script>
var PREBID_TIMEOUT = 1000;
var adUnits = [{
code: '400x600',
mediaTypes: {
video: {
context: 'instream',
mimes: ['video/mp4'],
playerSize: [400, 600],
minduration: 1,
maxduration: 2,
protocols: [1, 2, 3, 4, 5, 6, 7, 8],
w: 400,
h: 600,
startdelay: 2,
placement: 1,
playbackmethod: [2]
}
},
bids: [{
bidder: 'smartadserver',
params: {
networkId: 458,
siteId: 317777,
pageId: 1232599,
formatId: 84313
}
}]
}
];
// Configuration for PBS from http://prebid.org/dev-docs/get-started-with-prebid-server.html
pbjs.setConfig({
debug: true,
s2sConfig: {
accountId: '1',
enabled: false,
bidders: ['smartadserver'],
timeout: 1000,
adapter: 'prebidServer',
adapterOptions: {},
endpoint: 'http://localhost:8000/openrtb2/auction',
syncEndpoint: 'http://localhost:8000/cookie_sync'
}
});
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
</script>
<!-- PREBID CONFIGURATION END -->
In-app (Prebid Mobile)
Prebid Mobile (the Prebid SDK for in-app inventory) works in conjunction with Prebid Server to send/receive bids. You need to install Prebile Mobile SDK for
iOS and
Android.
For
configuration and samples, please see
Prebid Mobile official website.
AMP
Prebid Server can be used as an intermediary for Equativ to bid on
AMP environments. You need to have a Prebid Server instance plugged to your AMP tag through RTC. Thus, the adserver must be compliant with
Fast Fetch. This integration leverages
Stored Requests from Prebid Server.
For
configuration and samples, please see
Prebid AMP official website.
MediaTypes per AdUnit
Equativ's prebid adapter does not support multi-format AdUnits. Any AdUnits with more than one MediaType object does not participate in auctions.
As a workaround, you can use the same AdUnit with different setups (mediaType banner and mediaType video with context outstream):
var adUnits = [{
code: 'adslot',
mediaTypes: {
banner: {
sizes: [
[300, 250],
],
},
},
bids: [{
bidder: 'smartadserver',
params: {
domain: 'https://prg.smartadserver.com',
siteId: 317777,
pageId: 1143112,
formatId: 84313,
target: 'iid=8984466'
}
}],
},
{
code: 'adslot',
mediaTypes: {
video: {
playerSize: [640, 480],
context: 'outstream',
},
},
bids: [{
bidder: 'smartadserver',
params: {
domain: 'https://prg.smartadserver.com',
siteId: 207435,
pageId: 896536,
formatId: 85089,
bidfloor: 5,
video: {
protocol: 8,
}
}
}],
}];
The configuration above will generate two independent ad calls to Equativ and if Equativ responds to both, prebid.js will select the highest bidder.
UI setup
As Prebid Server allows for targeting based on siteId, pageId, formatId, you can target your
Deals to these parameters, as well as apply
delivery rules.
Reporting
You can use the reporting API to get data on server-side bidding using two dimensions:
- IS SERVER SIDE BIDDING: tags the auction (and all related events) as part of a server-side bidding context;
- SERVER SIDE BIDDING CALLER NAME: in case of Prebid Server integration, the value will be "Prebid Server";
Those dimensions are compatible with already existing dimensions/metrics.
To learn more about the Reporting API, see
this article.
GDPR and Privacy
Prebid Server is able to fetch the
consent_string. Our Prebid Server endpoint will receive it and process the data appropriately
Within the framework of
GDPR, Prebid Server behaves like a
data processor.
Cookie syncs save the user ID for each Bidder in the cookie, and each Bidder’s ID is sent back to that Bidder during the
auction. Prebid Server does not use this ID for any other reason. If the Prebid Server host company does not have consent to read/write cookies, /cookie_sync will return an empty response with no syncs. Otherwise, it will return a response limited to syncs for Bidders that have consent to read/write cookies.
For COPPA, the publisher can set a specific flag and then Prebid server will alter the bidRequest:
- All Device ID fields are removed: device.ifa, device.macsha1, device.macmd5, device.dpidsha1, device.dpidmd5, device.didsha1, device.didmd5
- Truncate device.ip field - remove lowest 8 bits.
- Truncate device.ipv6 field - remove lowest 32 bits.
- Remove geo.lat, geo.lon, geo.metro, geo.city, and geo.zip
- Remove user.id, user.buyeruid, user.yob, and user.gender