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.
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 want | Set | Where |
|---|---|---|
| Epom as one more bidder in their auction, under the name every adapter build recognises | What the tag brings = Nothing — the site runs its own Prebid and adds us as a bidder; naming switch As epom_as | the tag; the Code face |
| To bid under your own name, keeping “Epom” out of their configuration | Bidder code on the tag (or the default epom_{network}); naming switch As epom_{network}; the publisher adds the pbjs.aliasBidder line once per page | the tag; their page |
| Two Epom networks bidding on the same page | A Bidder code of its own on each network’s tag; both aliases declared once per page | each 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 template | A slot on a Native Placement; their adTemplate or rendererUrl on the ad unit | the tag; their ad unit |
| Their page already routes its bidders through a Prebid Server | The same bids entry; epom_as in their s2sConfig.bidders | their Prebid config — see Through their Prebid.js, into their Prebid Server |
Step by step
-
Account → Header Bidding → Add. Pick the Site, the Serving domain and a name.
-
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.

-
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 PlacementmediaTypes.native, a Site or Non-standard PlacementmediaTypes.banner), their ad unitcodeas 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 theirmediaTypes. Leave GAM ad unit and Fallback markup empty. -
Save, with Serve this tag on. Their entries exist only after this save.
-
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" } } }
-
Hand each entry over. It goes into an ad unit they already have — not a new ad unit. Their
mediaTypesstay as they are, their other bidders stay as they are, and the entry is one more object in that unit’sbidsarray: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.aliasBidderline goes once per page, before the auction. -
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?
| Symptom | Check | Where |
|---|---|---|
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_as | This network has no network id set on the ad server; nothing in the tag fixes it | Ask Epom support or your account manager |
| An entry does not show a change you made | The blocks are built from the last saved tag; a note above them flags unsaved changes | Save, then copy again |
| No bid from us at all, no error on the page | The alias line is missing: under any name but epom_as, Prebid drops the bidder in silence | pbjs.aliasBidder('epom_as', …) once per page, before the auction |
| Every bid is refused on the troubleshooting log | The placement is not listed on a saved, active tag — see When a placement answers bids | The tag’s Slots and Serve this tag |
| The request never leaves the page | host carries https:// or a path; the adapter refuses anything but a bare hostname | The host value in their entry (quoted from the tag’s Serving domain) |
| The log says the creative’s size was not asked for | Their mediaTypes.banner.sizes do not list the creative’s exact size | Their ad unit’s sizes; the placement’s size or the creatives’ sizes |
| The last ad units on a long page never get a bid | Their bidderTimeout is too short for the ad server to price every impression in one request | Their pbjs.setConfig({ bidderTimeout }) |
| Video: the troubleshooting log shows a bid, the page’s slot reports none, and the browser console shows an error | Prebid dropped the vastXml bid before bidsBackHandler: no cache setting for VAST | Their cache config: allowVastXmlOnly, useLocal or a Prebid Cache url |
| An outstream unit never fills | We return VAST, not a player; the unit needs a renderer of their own | Their ad unit’s renderer |
| A Google video line item never serves on our bid | Only a real Prebid Cache url produces the hb_uuid it needs | Their cache.url |
Your line item on hb_deal_<code> never matches | The 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 reports | Both tags bid under one code | A Bidder code per network, two alias lines |
| Our winner is chosen but never rendered on a Google page | A second Prebid run on the same ad unit codes overwrote the GPT key-values | Their page: one wrapper only on those ad units |
| No bid on a page with a price floor | The floor is in a currency the network cannot convert to USD | Their bidfloorcur; the network’s currency rates |
| Per-user capping does not hold on this page | The browser withholds third-party cookies on the serving domain; the bid is still made | The browser; see Frequency capping |
Reference
The entry. One block per slot, read off the Their Prebid.js, our adapter face.
| Field | Value | Notes |
|---|---|---|
bidder | epom_as, or the alias | The naming switch decides |
params.networkId | n1234 | Your network id; what a Prebid Server resolves the endpoint from |
params.host | ads.example.com | The tag’s Serving domain, bare hostname; where Prebid.js sends the bid |
params.placementKey | a4f21c9e7b | The slot’s placement |
params.channel | sports-uk | Only 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 slot | mediaTypes the ad unit may ask for | Size matching |
|---|---|---|
| Site Placement | banner | Exact match against mediaTypes.banner.sizes |
| Non-standard Placement | banner | Never matched; a sizeless creative is answered at the first size listed |
| Video Placement | video (context: 'instream') | Never matched; playerSize is a hint |
| Native Placement | native (OpenRTB or legacy asset form) | Assets, not sizes |
Prebid.js settings on their side.
| Setting | When |
|---|---|
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.