Skip to content

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

NameScopeDescriptionExampleType
apiKeyrequiredMissena's publisher token'PA-34745704'string
placementoptionalPlacement 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 placement
  • footer - Static footer placement
  • prestitial - Full-screen ad before content loads
  • postitial - Full-screen ad after content loads
  • infeed - In-feed placement within content
  • infeed.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

FieldDescription
ext.prebid.targetingControls targeting key generation (hb_pb, hb_bidder, etc.)
ext.prebid.targeting.pricegranularityPrice bucket granularity — must match your ad server line items
ext.prebid.cache.bidsEnables bid caching, required for AMP and some ad server setups
imp[0].ext.prebid.bidder.missena.apiKeyYour Missena publisher token
imp[0].ext.prebid.bidder.missena.placementPlacement type
imp[0].ext.prebid.bidder.missena.sampleCreative sample type (optional)

Prebid Server Endpoints

You can call Prebid Server directly via two endpoints:

EndpointUse Case
/openrtb2/auctionStandard OpenRTB auction — for server-to-server integrations
/openrtb2/ampAMP-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.json

Example 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:

Best Practices

  1. Always test the integration in a development environment first
  2. Monitor bid responses and performance
  3. Keep your apiKey secure
  4. Regularly update to the latest Prebid.js version
  5. Implement proper timeout settings