Prebid is a free open source library and community that helps advertisers participate in Header Bidding auctions.

Header Bidding (also known as header auctions and parallel bidding) is a technique that involves running SSP & Ad Exchange code directly on the webpage so publishers can receive bids on their inventory that may be unavailable through their primary ad server and exchange.

If a publisher uses Prebid on their website and you would like to buy traffic from this website, you need to use our bid adapter.

Important: Prebid is a programmatic technology. You need to have a programming background and be familiar with JavaScript and JSON at least. Otherwise, you might experience problems trying to configure it.

Adserver.Online prebid adapter is available in the Prebid library starting from version 5.3.0. The adapter supports display ads (banners) and video ads (VAST, instream/outstream). You will find the adapter documentation here.

You can download Prebid library including our adapter from the official download page or build it from the source code.

On the dashboard, you will find a special ad code for banner and VAST zones that you can use.

Integration example (postbid)

<html>
<head>
    <script async src="//media.aso1.net/js/pbj/prebid_for_testing_only.js"></script>
</head>

<body>

<script>
    var adUnits = [{
        code: 'postbid_iframe',
        mediaTypes: {
            banner: {
                sizes: [300, 250]
            }
        },
        bids: [{
            bidder: 'aso',
            params: {
                zone: 35954
            }
        }]
    }];

    var pbjs = pbjs || {};
    pbjs.que = pbjs.que || [];

    pbjs.que.push(function () {
        pbjs.addAdUnits(adUnits);
        pbjs.requestBids({
            bidsBackHandler: function () {
                var iframe = document.getElementById('postbid_iframe');
                var iframeDoc = iframe.contentWindow.document;
                var adServerTargeting = pbjs.getAdserverTargetingForAdUnitCode('postbid_iframe');

                // If any bidders return any creatives
                if (adServerTargeting && adServerTargeting['hb_adid']) {
                    pbjs.renderAd(iframeDoc, adServerTargeting['hb_adid']);
                } else {
                    iframe.width = sizes[0][0];
                    iframe.height = sizes[0][1];
                    iframeDoc.write('<head></head><body>' + passbackTagHtml + '</body>');
                    iframeDoc.close();
                }
            }
        });
    });

    // Define the passback HTML tag here.
    // Note that this tag is usually in either Script tag form or iFrame form.
    var passbackTagHtml = 'TO ADD';
</script>

<iframe id='postbid_iframe'
        FRAMEBORDER="0"
        SCROLLING="no"
        MARGINHEIGHT="0"
        MARGINWIDTH="0"
        TOPMARGIN="0"
        LEFTMARGIN="0"
        ALLOWTRANSPARENCY="true"
        WIDTH="0"
        HEIGHT="0">
</iframe>
</body>
</html>

Try it in action