Browse the help center

Header bidding on a site that runs its own Prebid.js

Add Epom as one more bidder to a publisher's own Prebid.js — step by step from the Bidder integration tag to the bids entry in their ad unit, the scenarios it fits (alias, video, native, two networks, routing through their Prebid Server), the caveats, a fix-it checklist and the entry reference.

How-to network manager admin Account → Header Bidding

What it is and why

Use this route when the publisher already runs Prebid.js: they already have ad units and already run the auction, and Epom becomes one more bidder inside it. Nothing of ours goes on their page except one entry per ad unit — the tag produces no script and no containers. You create it in Bidder integration, copy one bids entry per ad unit off its Code face, and the publisher puts each into an ad unit they already have. The same entries work when their Prebid.js routes its bidders through a Prebid Server.

Two conditions, before anything else: our adapter has to be in their Prebid build — the epom_as module is not yet in a released Prebid.js build (it has been submitted to Prebid and is under review; upstream ships only epom_dsp, which is the buy side and cannot sell your inventory), so ask Epom support or your account manager for the module or a build that carries it; and their placements have to be listed on a tag, or every bid is refused — see When a placement answers bids.

Example. An article page runs Prebid.js with four ad units and five bidders. You want to bid on two of them: the 728×90 / 970×250 leaderboard and the 300×250 rectangle. You build a tag in Bidder integration with two slots, one on each placement, and hand the publisher two bids entries. Their page sends both impressions to your serving domain in one request; the ad server prices them in order within their bidderTimeout and answers in their auction like any other bidder, so a roadblock across the two units holds.

Typical scenarios

You wantSetWhere
Epom as one more bidder in their auction, under the name every adapter build recognisesWhat the tag brings = Nothing — the site runs its own Prebid and adds us as a bidder; naming switch As epom_asthe tag; the Code face
To bid under your own name, keeping “Epom” out of their configurationBidder code on the tag (or the default epom_{network}); naming switch As epom_{network}; the publisher adds the pbjs.aliasBidder line once per pagethe tag; their page
Two Epom networks bidding on the same pageA Bidder code of its own on each network’s tag; both aliases declared once per pageeach tag
Instream video in a player that takes VAST as a string (IMA, JW)A slot on a Video Placement; the publisher adds pbjs.setConfig({ cache: { allowVastXmlOnly: true } })the tag; their Prebid config
A native ad unit rendered by their own templateA slot on a Native Placement; their adTemplate or rendererUrl on the ad unitthe tag; their ad unit
Their page already routes its bidders through a Prebid ServerThe same bids entry; epom_as in their s2sConfig.bidderstheir Prebid config — see Through their Prebid.js, into their Prebid Server

Step by step

  1. Account → Header Bidding → Add. Pick the Site, the Serving domain and a name.

  2. Set What the tag brings to Nothing — the site runs its own Prebid and adds us as a bidder. The timeout, refresh and Google settings disappear: their Prebid owns all of that. Bidder code takes their place; what to put there is under Create a tag.

    Tag settings with What the tag brings set to Nothing — the site runs its own Prebid and adds us as a bidder, and the Bidder code field

  3. On Slots, add one slot per ad unit of theirs that should carry our bid: the Placement that answers it (its type decides what the ad unit may ask for — a Video Placement answers mediaTypes.video, a Native Placement mediaTypes.native, a Site or Non-standard Placement mediaTypes.banner), their ad unit code as the Container name (it marks nothing on the page in this mode; it only names the entry), and on a Site Placement the placement’s own size under Ad units — required, though nothing you pick here reaches their page: the sizes are their mediaTypes. Leave GAM ad unit and Fallback markup empty.

  4. Save, with Serve this tag on. Their entries exist only after this save.

  5. Open Code and pick Their Prebid.js, our adapter on the switch at the top. Above the entries a second switch picks the name we bid under: As epom_as — recognised by any Prebid that carries our adapter, with nothing else to declare — or As epom_{network}, the network’s own code or the tag’s Bidder code if you set one, which keeps our name out of their configuration at the cost of one more thing they must not forget. Then one block per slot, headed by the container name, with a copy button:

    // once per page, before the auction — only under an alias
    pbjs.aliasBidder('epom_as', 'epom_n1234');
    
    // into the bids of ad unit "article-leaderboard"
    {
      bidder: 'epom_n1234',
      params: {
        networkId: 'n1234',
        host: 'ads.example.com',
        placementKey: 'a4f21c9e7b',
        channel: 'sports-uk',
        customParams: { "section": "sport" }
      }
    }

    The Code face for a page that already runs Prebid.js: the per-slot bids entry and the naming switch

  6. Hand each entry over. It goes into an ad unit they already have — not a new ad unit. Their mediaTypes stay as they are, their other bidders stay as they are, and the entry is one more object in that unit’s bids array:

    pbjs.addAdUnits([{
      code: 'article-leaderboard',
      mediaTypes: { banner: { sizes: [[728, 90], [970, 250]] } },
      bids: [
        { bidder: 'appnexus', params: { placementId: 13144370 } },
        { bidder: 'epom_as', params: { networkId: 'n1234', host: 'ads.example.com', placementKey: 'a4f21c9e7b' } }
      ]
    }]);

    Under an alias, the pbjs.aliasBidder line goes once per page, before the auction.

  7. Check the result: the Header Bidding report shows what each slot filled, and the placement’s troubleshooting log explains every refused bid — What the troubleshooting log says about a bid.

Caveats and exceptions

Who does what. The network manager builds the tag and copies the entries; the publisher’s Prebid configuration is theirs to edit, and their developer pastes the entries into their own ad units (what a publisher installs). A Can View share sees the site’s tags but cannot save or delete them — see the per-role notes on the main page. The tag needs the access listed under Permissions.

There is no Partners tab in this mode. Other bidders on that ad unit are theirs to configure, and Save refuses a tag in this mode while any slot still names a partner — remove them before switching, because the tab that holds them is hidden once you have.

The entries are a snapshot. The blocks are built from the last saved tag, so an edit reaches them only after you save; a note above the blocks flags the unsaved changes. channel and customParams appear only when the placement carries them under Ad tags & API → Settings — see Channel and custom parameters. Change them on the placement afterwards and the publisher has to be given the new entry, because in this mode their Prebid config is the copy that counts. The same holds for host, which is quoted from the tag’s Serving domain.

networkId names your network. Prebid.js still sends the bid to host, the network’s own domain, where its cookies live. The field is there so the same entry also works in a publisher’s Prebid Server, which may not take a bidder’s address from a parameter and reaches the network by its id instead. An adapter that predates the field ignores it.

An alias has to be declared, once per page, before the auction. Under any name other than epom_as the adapter entry opens with pbjs.aliasBidder('epom_as', …); leave that line out and Prebid drops the bidder in silence. An empty Bidder code is not epom_as — it is epom_ plus the network id, so the alias line is there unless you typed epom_as. The alias line names pbjs; if their Prebid runs under another global, they rename that one call — the entry itself carries no global.

A long alias truncates the Google key. Prebid cuts targeting key names at 20 characters, so hb_deal_ plus a bidder code longer than 12 characters reaches Ad Manager shortened — hb_deal_epom_dailynews becomes hb_deal_epom_dailyne. Build the line item on the shortened key, or keep the code short.

Two Epom networks on one page need two names. Both entries are called under one code, but their reports and the hb_*_<bidder> keys then show one Epom, and a Prebid Server keeps only one of them. Give each network a Bidder code of its own; both aliases are declared once per page, before the auction.

Their auction stays the only auction. A second addAdUnits + requestBids on the same ad unit codes — a second wrapper, a second Prebid build, our tag in Owned or Adopt mode beside theirs — silently voids the first one’s targeting: whichever run writes the GPT key-values last is the one Google sees, and the other run’s winner is never rendered.

Every Epom ad unit on the page travels in one request to https://{host}/hb/bid, so roadblocks and one-campaign-per-page rules hold across the page. host is the serving domain as a bare hostname — no https://, no path; the adapter refuses anything else before the request leaves the page. The ad server prices the impressions in order and stops at their bidderTimeout, less a little kept back for the round trip, so a short timeout on a page with many units leaves the last impressions unbid. The programmatic partners asked for an impression get the same deadline: their answers are not waited for past it.

Sizes. Their mediaTypes.banner.sizes are the sizes we may answer with, and the creative has to match one of them exactly or no bid is made — you see each refusal on the placement’s troubleshooting log as a size the impression did not ask for. A placement pinned to one size needs that size in their list; a placement that allows variable sizes needs every size its creatives come in. Two cases are never size-matched: video, and any creative on a Non-standard Placement, sized or not. A sizeless creative on a Non-standard Placement is answered at the first size their unit lists; one with a size of its own is answered at that size.

Instream video. A Video Placement answers mediaTypes.video with context: 'instream'; playerSize is a hint and never matched. The bid comes back as VAST in vastXml, and Prebid.js drops a VAST bid before bidsBackHandler unless their config says what to do with it. Pick by where the ad is going: a player that takes VAST as a string (IMA, JW) needs pbjs.setConfig({ cache: { allowVastXmlOnly: true } }); a player that wants a URL needs cache: { useLocal: true }; only a real Prebid Cache — cache: { url: 'https://…/cache' } — produces the hb_uuid a Google Ad Manager video line item needs. We return VAST, not a player: an outstream unit needs a renderer of their own, or Prebid discards the bid.

Native. A Native Placement answers mediaTypes.native, in the OpenRTB or the legacy asset form; the bid answers each asset under the id they asked it under. Rendering is theirs — an adTemplate or rendererUrl on the ad unit, or their own code over bid.native.ortb.

Consent, floors and capping. Consent works as described under Consent: their consentManagement module’s string rides the request, and a page without one still bids. Floors from their Price Floors module, or params.bidFloor, are honoured before any markup is built — in USD, or converted to USD from their bidfloorcur at the rate the network holds; a floor in a currency that cannot be priced gets no bid. Capping rides a cookie on the serving domain: the adapter sends the request with credentials, so the identity our beacons set reaches the next bid; a browser that withholds third-party cookies leaves per-user capping without an id on that page, and the bid is still made.

Through their Prebid.js, into their Prebid Server

The commonest server-side case has no slot id in it at all. A page already running Prebid.js can route some or all of its bidders through a Prebid Server instead of calling them from the browser, and for that publisher we are one more name in a list they already keep:

pbjs.setConfig({
  s2sConfig: [{
    accountId: 'the-id-their-server-issued',
    bidders: ['epom_as'],
    enabled: true,
    endpoint: 'https://their-prebid-server.example.com/openrtb2/auction',
  }],
});

Their ad unit does not change, and neither does the entry we print on the Their Prebid.js, our adapter face — the same bids[] line, with the same networkId, host and placementKey. Prebid.js carries those params to their server as imp.ext.prebid.bidder.epom_as, which is the same place every other server face puts them, so there is nothing to store and nothing to keep in step. What the publisher needs from us is those values; what they need from their own host is the accountId and an epom_as their server recognises.

The slot still has to be sold by an active tag here, exactly as in the browser case — a request routed through a server carries no mark saying so, and the ad server cannot tell one from the other.

Not working?

SymptomCheckWhere
The Code face still says Save the tag once to get a document per slot. after you saved, and the naming switch offers only epom_asThis network has no network id set on the ad server; nothing in the tag fixes itAsk Epom support or your account manager
An entry does not show a change you madeThe blocks are built from the last saved tag; a note above them flags unsaved changesSave, then copy again
No bid from us at all, no error on the pageThe alias line is missing: under any name but epom_as, Prebid drops the bidder in silencepbjs.aliasBidder('epom_as', …) once per page, before the auction
Every bid is refused on the troubleshooting logThe placement is not listed on a saved, active tag — see When a placement answers bidsThe tag’s Slots and Serve this tag
The request never leaves the pagehost carries https:// or a path; the adapter refuses anything but a bare hostnameThe host value in their entry (quoted from the tag’s Serving domain)
The log says the creative’s size was not asked forTheir mediaTypes.banner.sizes do not list the creative’s exact sizeTheir ad unit’s sizes; the placement’s size or the creatives’ sizes
The last ad units on a long page never get a bidTheir bidderTimeout is too short for the ad server to price every impression in one requestTheir pbjs.setConfig({ bidderTimeout })
Video: the troubleshooting log shows a bid, the page’s slot reports none, and the browser console shows an errorPrebid dropped the vastXml bid before bidsBackHandler: no cache setting for VASTTheir cache config: allowVastXmlOnly, useLocal or a Prebid Cache url
An outstream unit never fillsWe return VAST, not a player; the unit needs a renderer of their ownTheir ad unit’s renderer
A Google video line item never serves on our bidOnly a real Prebid Cache url produces the hb_uuid it needsTheir cache.url
Your line item on hb_deal_<code> never matchesThe key was cut to 20 characters (hb_deal_epom_dailyne)The line item’s key in Ad Manager, or a shorter Bidder code
Two Epom networks, one shows in their reportsBoth tags bid under one codeA Bidder code per network, two alias lines
Our winner is chosen but never rendered on a Google pageA second Prebid run on the same ad unit codes overwrote the GPT key-valuesTheir page: one wrapper only on those ad units
No bid on a page with a price floorThe floor is in a currency the network cannot convert to USDTheir bidfloorcur; the network’s currency rates
Per-user capping does not hold on this pageThe browser withholds third-party cookies on the serving domain; the bid is still madeThe browser; see Frequency capping

Reference

The entry. One block per slot, read off the Their Prebid.js, our adapter face.

FieldValueNotes
bidderepom_as, or the aliasThe naming switch decides
params.networkIdn1234Your network id; what a Prebid Server resolves the endpoint from
params.hostads.example.comThe tag’s Serving domain, bare hostname; where Prebid.js sends the bid
params.placementKeya4f21c9e7bThe slot’s placement
params.channelsports-ukOnly when set on the placement under Ad tags & API → Settings
params.customParams{ "section": "sport" }Only when set on the placement

What the placement type answers.

Placement type on the slotmediaTypes the ad unit may ask forSize matching
Site PlacementbannerExact match against mediaTypes.banner.sizes
Non-standard PlacementbannerNever matched; a sizeless creative is answered at the first size listed
Video Placementvideo (context: 'instream')Never matched; playerSize is a hint
Native Placementnative (OpenRTB or legacy asset form)Assets, not sizes

Prebid.js settings on their side.

SettingWhen
pbjs.aliasBidder('epom_as', '<code>')Any bidder name other than epom_as; once per page, before the auction
cache: { allowVastXmlOnly: true }Instream video into a player that takes VAST as a string (IMA, JW)
cache: { useLocal: true }A player that wants a URL
cache: { url: 'https://…/cache' }A Google Ad Manager video line item (hb_uuid)
s2sConfig with bidders: ['epom_as']Routing through their Prebid Server

The request itself — one call to https://{host}/hb/bid per page, OpenRTB 2.6 — is described in the OpenRTB integration reference. Every setting of the tag and the slot is on Header bidding tag settings and slots.

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.