Supply inventory with prebid.js header bidding (legacy adapter)
Overview
This document outlines the features and client-side setup of Equativ as a bidder in prebid,js, using Equativ's legacy prebid.js adapter.
Using the legacy adapter is not recommended for new implementations. Use the new prebid.js adapter instead.
For more information about the setup in Equativ's Monetization platform, see Set up and manage client-side header bidding.
Legacy versus new adapter
Equativ's legacy prebid.js adapter remains available and can be used in parallel with the new adapter. For more information about the benefits and limitations of the new adapter, see Supply inventory with prebid.js header bidding (new adapter).
Documentation
For detailed technical documentation of Equativ's legacy prebid.js adapter, refer to the Smart AdServer bidder page containing the supported features and components, bid parameters, and other valuable information. Smart AdServer is Equativ's previous name.
Don't use the Equativ bidder page (bidder code: equativ
) since it is about the new prebid.js adapter. For more information, see Supply inventory with prebid.js header bidding (new adapter).
Recommended modules
When you customize and download prebid.js, Equativ recommends to include the following modules:
- Supply Chain Object Module; for more information, see also Sellers.json and Supply Chain Object compliancy.
- Currency module; for more information, see section “Currency management” later in this document.
User sync configuration
With the configuration of the user syncing process, you can control how bidders match user IDs with their DSPs. This can be useful to optimize page performance and to ensure user privacy and security. Fore more information, see Configure User Syncing.
By default, prebid.js waits 3 seconds after the auction completes before allowing all bidder adapters to drop up to five image-based user syncs.
However, Equativ's bidder is using iframe-based user-syncing, instead of image-based user-syncing. To accommodate this, you must permit iframe syncs for the Equativ bidder.
The following snippet shows how you can allow the smartadserver
bidder to use iframe-based user syncing.
pbjs.setConfig({
userSync: {
filterSettings: {
iframe: {
bidders: ['smartadserver'],
filter: 'include'
}
}
}
});
Net price, gross price and bid price adjustment
By default, the Equativ adapter returns the bid price as a net value, meaning the price is indicated without Equativ's revenue share included. If you prefer to receive the bid price as a gross value, which includes Equativ's revenue share, you can request this change by contacting your Equativ representative.
In both cases, the Equativ adapter indicates in the bid response whether the price is net or gross, so you can still perform client-side bid price adjustments. For more information, see "2.2. bidCpmAdjustment" in the pbjs.bidderSettings documentation.
You can also apply bid price adjustment for deals if Equativ's revenue share for deals is different from the one for open auctions. For more information, see Deals in Prebid.
Currency management
With the optional Prebid.js currency module, you can specify an ad server currency and convert all bids to this currency before the auction.
For example, the following snippet sets the adServerCurrency
to EUR
:
pbjs.setConfig({
"currency": {
"adServerCurrency": "EUR",
"defaultRates": { "USD": { "EUR": 0.8 }}
}
});
The optional defaultRates
attribute is recommended in case there is an issue loading the currency file.
If the currency module is not installed, Equativ will consider the incoming bid floor—if it exists—as a USD
bid floor, Equativ will bid in USD
and prebid.js will process all bids as USD
bids.
If the Currency Module is installed, and if an adServerCurrency
is defined, Equativ will consider the incoming bid floor—if it exists—as a bid floor in the defined adServerCurrency
, Equativ will bid in the defined adServerCurrency
, and prebid.js will automatically convert all bids to the defined adServerCurrency
.
Price Floors module
Equativ's prebid.js adapter supports the optional Price Floors Module. With this module, you can manage floors at a single location for all bidders and you can tailor floors to the individual page or auction context. Floors can be dynamic, using a third party in real time or static, if defined at ad unit level.
The bidFloor
parameter of the Equativ adapter remains available. If it is defined, it overrides the values from the Floors Module.
Video implementations
You can implement out-stream video can be implemented in the following two ways:
- Implementation with the
mediaType
video
andcontext
outstream
: in this case, Equativ only returns the VAST ad. Publishers must implement their own video renderer. - Implementation with the
mediaType
banner
: in this implementation, you can benefit from Equativ’s out-stream video creative templates, such as In-read (web).
You can implement in-stream video with the mediaType
video
and context instream
.
Monetization of ad units with multiple setups
The legacy Equativ adapter is able to read multiple configurations of the same ad unit. The snippet below shows an ad unit set up with the two mediaTypes
banner
and video
outstream
. This configuration generates two independent ad calls to Equativ. If Equativ responds to both, prebid.js will select the highest bidder.
var adUnits = [{
code: 'prebid_tag_001',
mediaTypes: {
banner: {
sizes: [[300,250]]
},
video: {
context: 'outstream',
playerSize: [640, 480],
protocols: [6, 7, 8]
}
},
bids: [{
bidder: 'smartadserver',
params: {
domain: 'https://prg.smartadserver.com',
siteId: 411951,
pageId: 1383641,
formatId: 84313
}
}]
}
];
AMP inventory
Header Bidding with prebid.js is not possible for AMP inventory. Use Prebid server instead.
Testing
Use the following snippet to test your implementation. It logs responses in the console, including adId
, bidder
, or cpm
.
var responses = pbjs.getBidResponses();
var output = [];
for (var adunit in responses) {
if (responses.hasOwnProperty(adunit)) {
var bids = responses[adunit].bids;
for (var i = 0; i < bids.length; i++) {
var b = bids[i];
output.push({
'adunit': adunit, 'adId': b.adId, 'bidder': b.bidder,
'time': b.timeToRespond, 'cpm': b.cpm, 'msg': b.statusMessage
});
}
}
}
if (output.length) {
if (console.table) {
console.table(output);
} else {
for (var j = 0; j < output.length; j++) {
console.log(output[j]);
}
}
} else {
console.warn('NO prebid responses');
}
Known limitation
When there is no ad, the bidder returns isNetCpm: false
even if the BidInNetForHeaderBidding
flag is set to true
.