Appearance
Server Side Prebid Integration
Overview
Server-side prebid integration (S2S) offers several advantages over client-side integration, including:
- Improved page load performance
- Better user experience
- Reduced browser resource usage
- Enhanced privacy controls
- More reliable timeout management
Integration Steps
1. Configure Prebid.js
Add Missena to your Prebid.js S2S configuration:
javascript
pbjs.setConfig({
s2sConfig: [{
accountId: '1',
bidders: ['missena'], // Add Missena to bidders array
adapter: 'prebidServer',
enabled: true,
endpoint: 'https://prebid-server.example.com/openrtb2/auction',
syncEndpoint: 'https://prebid-server.example.com/cookie_sync',
timeout: 500
}]
});2. Set Bid Parameters
Configure the bid parameters for Missena:
javascript
{
bidder: 'missena',
params: {
apiKey: 'PA-34745704', // Required: Your Missena publisher token
placement: 'sticky' // Optional: Placement type (defaults to 'sticky')
}
}3. Bid Parameters Reference
| Name | Scope | Description | Example | Type |
|---|---|---|---|---|
apiKey | required | Missena's publisher token | 'PA-34745704' | string |
placement | optional | Placement Type, default: 'sticky' | 'sticky' | string |
Available Placement Values
The placement parameter accepts the following values:
sticky- Default sticky placement (default for server-side)header- Header placementfooter- Static footer placementprestitial- Full-screen ad before content loadspostitial- Full-screen ad after content loadsinfeed- In-feed placement within contentinfeed.s- Small in-feed placement
4. Example Implementation
javascript
const adUnits = [{
code: 'div-1',
mediaTypes: {
banner: {
sizes: [[300, 250]]
}
},
bids: [{
bidder: 'missena',
params: {
apiKey: 'PA-34745704',
placement: 'sticky'
}
}]
}];Prebid Server Stored Requests
If you run your own Prebid Server (not using Prebid.js S2S mode), you can configure Missena via stored requests. This is required for AMP pages and useful for any server-side-only setup.
A stored request is an OpenRTB JSON object that defines the auction parameters. Prebid Server resolves it by tag_id at request time.
Stored Request Structure
json
{
"id": "PA-34745704",
"site": {
"page": "https://publisher.com"
},
"ext": {
"prebid": {
"targeting": {
"includewinners": true,
"includebidderkeys": true,
"pricegranularity": {
"precision": 2,
"ranges": [
{
"max": 20.00,
"increment": 0.10
}
]
}
},
"cache": {
"bids": {}
}
}
},
"imp": [
{
"id": "msna-banner",
"banner": {
"format": [
{
"w": 300,
"h": 250
}
]
},
"ext": {
"prebid": {
"bidder": {
"missena": {
"apiKey": "PA-34745704",
"placement": "sticky"
}
}
}
}
}
]
}Key Fields
| Field | Description |
|---|---|
ext.prebid.targeting | Controls targeting key generation (hb_pb, hb_bidder, etc.) |
ext.prebid.targeting.pricegranularity | Price bucket granularity — must match your ad server line items |
ext.prebid.cache.bids | Enables bid caching, required for AMP and some ad server setups |
imp[0].ext.prebid.bidder.missena.apiKey | Your Missena publisher token |
imp[0].ext.prebid.bidder.missena.placement | Placement type |
imp[0].ext.prebid.bidder.missena.sample | Creative sample type (optional) |
Prebid Server Endpoints
You can call Prebid Server directly via two endpoints:
| Endpoint | Use Case |
|---|---|
/openrtb2/auction | Standard OpenRTB auction — for server-to-server integrations |
/openrtb2/amp | AMP-specific endpoint — takes a tag_id and returns targeting key-values |
Example auction request:
bash
curl -X POST 'https://your-prebid-server.example.com/openrtb2/auction' \
-H 'Content-Type: application/json' \
-d @stored-request.jsonExample AMP request:
bash
curl 'https://your-prebid-server.example.com/openrtb2/amp?tag_id=PA-34745704-footer-native&w=300&h=250'For AMP-specific integration details including the full rtc-config setup, see the AMP Integration guide.
Support
For additional support or questions about Missena integration:
- Contact Missena support team
- Review the technical documentation
- Check the prebid.org documentation
Best Practices
- Always test the integration in a development environment first
- Monitor bid responses and performance
- Keep your apiKey secure
- Regularly update to the latest Prebid.js version
- Implement proper timeout settings