Browse the help center

Header bidding: what a publisher installs

For a publisher whose network sells through Prebid — what the network hands you for each setup (our Prebid.js, your own Prebid.js, a Prebid Server, Prebid Mobile in an app), where each piece goes, and what to check when a slot stays empty.

How-to publisher

When your network sells your inventory through header bidding, its demand prices each ad position before your own ad server is asked, through Prebid. You do not build anything for it: the network sets up a header-bidding tag for your site and hands you a few lines to install once. After that, every change is made on the network’s side, with nothing to re-install.

There is no Epom SDK. Epom takes part as an ordinary Prebid bidder called epom_as.

Who this is for

Publishers whose network sells their pages or apps through Prebid. The stock Publisher role has no Header Bidding tab, so the network builds the tag and sends you what to install. If your network adds the tab to your role, you can build the tags for sites you may edit yourself; the full guide is Header bidding.

Prerequisites

  • Your site or app set up in the network, with placements for the ad positions you want sold — your network manager creates them or tells you which ones to use.
  • Edit access to the page <head> (or the WordPress theme header), your Prebid.js configuration, or the app code — whichever the integration below needs.
  • For Google Ad Manager pages: rights in your Ad Manager to create key-values, an order, a line item and a creative.
  • For your own Prebid.js or your own Prebid Server: a build that includes the epom_as bidder adapter, which you get from your network — see Getting the adapter.
  • For apps: Prebid Mobile in the app, and on Android the AD_ID permission.

What you receive

Tell your network manager how ads are served today; that decides what you get.

How your pages or app serve ads todayWhat the network sends youWhere it goes
Google Ad Manager, no PrebidOne script and one container per ad position, plus a line item to set up in your Ad ManagerThe script in the page <head>, the containers where the ads go
Google Ad Manager with your own googletag code you must keepThe same script; the network lists your slot ids or ad unit paths in the tagThe page <head>, above the Google tag
Your own Prebid.jsOne bids entry per ad unit (and an alias line, if the network bids under its own name)Your Prebid configuration
An app (Prebid Mobile), or a server-side auctionThe Prebid Server address, an account id and one slot id per ad unitYour app code
Your own Prebid ServerThe address your server reads the slots from, or one document per slotYour Prebid Server’s configuration

Getting the adapter

You need the epom_as adapter only when the auction runs in your own Prebid.js or your own Prebid Server. With the network’s script, or with the Prebid Server address the network sends, there is nothing to add.

The adapter is Epom’s and is not in the standard Prebid.js download or in a released Prebid Server build. It has been submitted to the Prebid projects and is under review; until it is released there, you get it from your network, which gets it from Epom:

  • Prebid.js — the module to add to your own build, or a ready build that carries it.
  • Prebid Server — your server has to be built with the adapter. Ask your network; Epom helps with the setup.

The epom_dsp adapter in the standard download is a different Epom product, for buying media, and cannot take part in these auctions.

Steps: a page with Google Ad Manager

  1. Paste the script into the page <head>, above the Google Publisher Tag, exactly as sent:

    <script src="https://{serving-domain}/eas/t/{tag-id}.js"></script>

    Do not add async and do not defer it: it has to run before Google’s tag to hold the ad request until the bids are in.

  2. Where each ad should appear, place the container the network sent, for example <div data-eas-ad="leaderboard"></div>. If the network adopted your existing Google slots, skip this step: your own googletag slots stay.

  3. In your Google Ad Manager, create what the network describes: the key-values hb_pb, hb_adid, hb_size, hb_bidder and hb_deal_epom_as, an order with a line item targeted at your ad units, and the Prebid universal creative. The network’s guide to this is The Google Ad Manager line item.

  4. Load the page. Positions the network’s campaigns buy show their ads; the rest are filled by Google exactly as before.

On WordPress, put the script in the theme’s header area, not in a post block, so it loads above the Google tag on every page. A later change to the tag reaches pages that already carry the script within about five minutes.

Steps: your own Prebid.js

  1. Make sure your Prebid.js build includes the epom_as bidder adapter — see Getting the adapter.

  2. Add each bids entry to the existing ad unit it names — an extra object in that unit’s bids array, next to your other bidders. Keep your mediaTypes, sizes and other bidders unchanged. With the values the network sent, an ad unit looks like this:

    pbjs.addAdUnits([{
      code: 'article-leaderboard',                      // your ad unit, unchanged
      mediaTypes: { banner: { sizes: [[728, 90], [970, 90]] } },
      bids: [
        { bidder: 'yourOtherBidder', params: { /* unchanged */ } },
        {
          bidder: 'epom_as',
          params: {
            networkId: 'n1234',                         // your network
            host: 'ads.example.com',                    // the network's serving domain
            placementKey: 'a4f21c9e7b'                  // the placement for this position
          }
        }
      ]
    }]);

    Copy the values from what the network sent rather than typing them:

    ParamRequiredWhat it is
    networkIdYesYour network, as n and a number
    hostWhen sentThe network’s serving domain, as a bare hostname — no https://, no path
    placementKeyYesThe placement that sells this position
    channelNoA traffic label the network targets and reports on; sent only if the placement has one
    customParamsNoKey-value pairs the network targets on, for example { section: 'sport' }
    bidFloor, bidFloorCurNoA floor for this position, in USD — a floor in any other currency is read as USD, not converted; a floor from the Price Floors module wins over it

    If the network bids under its own name, the entry’s bidder is that name (for example epom_n1234) instead of epom_as, and the alias line in the next step comes with it.

  3. If the network sent an alias line (pbjs.aliasBidder('epom_as', '…')), run it once per page before the auction; rename pbjs if your Prebid uses another global.

  4. Run your auction as usual. Do not add a second wrapper or the network’s own script beside your Prebid: two auctions on the same ad units overwrite each other’s results.

For video units, your Prebid needs a cache setting or it drops our VAST bids before your bidsBackHandler runs; see Instream video under What the publisher does with it.

Steps: an app with Prebid Mobile

  1. Point the SDK at the Prebid Server address and account the network sent — a small-volume shared server or a dedicated one, as described under Which Prebid Server to use. For example on Android:

    PrebidMobile.setPrebidServerAccountId("<networkId>");
    PrebidMobile.setPrebidServerHost(Host.createCustomHost("https://<prebid-server>/openrtb2/auction"));
  2. Use each slot id (it looks like <networkId>-26) as the configId of one ad unit. One id serves one kind of creative: a rewarded video and a rewarded playable are two ad units with two ids.

  3. Start the ad units from the SDK’s initialisation callback, so the first request is not lost.

  4. On Android, declare the AD_ID permission; without it frequency caps cannot apply to your users.

The example apps for iOS and Android show each format end to end. If the app logs Prebid server does not recognize Config Id, compare the id character by character with the list the network sent, then see When the app gets nothing.

Options you keep

  • Floors. A floor you set in Prebid — the Price Floors module, params.bidFloor, or imp.bidfloor from the SDK — is honoured before Epom bids. Floors are in US dollars.
  • Consent. Your consent manager’s TCF string is passed on with every bid request; nothing to change on your side. A page without a consent manager still bids.
  • Your other bidders and Google demand. They compete as before; header bidding adds one bidder, it does not replace your ad server.

Corner cases and gotchas

Corner case: the tag script must load before the Google tag. Loaded after it — moved to the footer, given async, or delayed by a script-optimisation plugin — it cannot hold Google’s first ad request, so the page’s first impressions go without the bids and header bidding joins only from the first refresh. The browser console says so.

Corner case: in your own Prebid, a creative bids only in a size your ad unit lists. If an ad unit never shows Epom demand, check that its mediaTypes.banner.sizes include the sizes the network sells there.

Corner case: a slot id is fixed once created. If the network removes a slot and adds it again, it has a new id, and the app has to be updated with it.

Per-role notes

  • Publisher (stock role): no Header Bidding tab; you install what the network sends and see the results in your usual reports.
  • Publisher with the Header Bidding tab: build tags for sites you can edit — see Header bidding.

Related pages

Please disable Adblock
Are you using adblock? Disable it and reload the page to proceed to the destination page.

A registration has already been submitted from this page. Please try again in 10 minutes.