---
title: "Add the network's bidder to your own Prebid.js"
description: "For a publisher who already runs Prebid.js — build in the epom_as adapter, add the bids entry the network sent to each ad unit, run the alias line if there is one and keep a single auction, with the video cache note, where the adapter comes from and what to check when a position never shows network demand."
type: "howto"
audience: [publisher]
keywords: [header bidding, prebid.js, own prebid, bids entry, epom_as, adapter, bidder adapter, aliasBidder, alias, networkId, host, placementKey, mediaTypes, sizes, two wrappers, video cache, bidsBackHandler, epom_dsp]
---

Fetch the complete documentation index at: https://epom.com/ad-server/docs/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Add the network's bidder to your own Prebid.js

## What it is and why

Your pages already run Prebid.js, and your network joins the auction as one more bidder: it
sends one `bids` entry per ad unit (and an alias line, if it bids under its own name), and you
add them next to your other bidders. Your ad units, sizes and other bidders stay as they are.
There is no Epom SDK — Epom takes part as an ordinary Prebid bidder called `epom_as`. The other
setups are on [Header bidding: what a publisher installs](https://epom.com/ad-server/docs/guides/inventory/header-bidding-for-publishers.md).

**Example.** An ad unit `article-leaderboard` with sizes 728×90 and 970×90 gets a second `bids`
object — `bidder: 'epom_as'` with the network's `networkId`, `host` and `placementKey`. On each
page view the network's campaigns compete with the unit's other bidders; when they win, their
creative renders in that unit, in one of its listed sizes.

## Typical scenarios

| How your pages serve ads today | What the network sends you | Where it goes |
|---|---|---|
| Your own Prebid.js | One `bids` entry per ad unit (and an alias line, if the network bids under its own name) | Your Prebid configuration |
| Your own Prebid.js with video units | The same, plus a cache setting on your side | Your Prebid configuration |

## Step by step

1. Make sure your Prebid.js build includes the `epom_as` bidder adapter — see
   [Getting the adapter](#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:

   ```js
   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 (the parameters are
   under [Reference](https://epom.com/ad-server/docs/guides/inventory/header-bidding-for-publishers.md#reference) on the hub). 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.

   ![The network's Code face for a page that already runs Prebid.js: the per-slot bids entry](https://epom.com/docs-images/ad-server/header-bidding/hb-code-their-prebidjs-adapter.webp)

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 the network's VAST bids before
your `bidsBackHandler` runs; see *Instream video* under
[What the publisher does with it](https://epom.com/ad-server/docs/guides/inventory/header-bidding-own-prebid-js.md#_3-what-the-publisher-does-with-it).

### 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.

## Caveats and exceptions

**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.

The caveats that apply to every setup — who this is for, what you need before you start, the
floors and consent you keep, how changes reach the page — are on
[Header bidding: what a publisher installs](https://epom.com/ad-server/docs/guides/inventory/header-bidding-for-publishers.md#caveats-and-exceptions).

## Not working?

- **A position never shows network demand (own Prebid.js).** Where: that ad unit's
  `mediaTypes.banner.sizes` against the sizes the network sells; the `bids` entry's `networkId`,
  `host` (bare hostname, no `https://`, no path) and `placementKey` against what the network sent;
  whether the alias line runs before the auction.
- **Two wrappers on the page.** Where: the page source — the network's script beside your own
  Prebid runs two auctions on the same units and each overwrites the other's results; keep one.
- **Video bids vanish before `bidsBackHandler`.** Where: your Prebid's cache setting — see
  *Instream video* under [What the publisher does with it](https://epom.com/ad-server/docs/guides/inventory/header-bidding-own-prebid-js.md#_3-what-the-publisher-does-with-it).

The causes common to every setup (currency floors, the consent stub, the missing tab) are on
[Header bidding: what a publisher installs](https://epom.com/ad-server/docs/guides/inventory/header-bidding-for-publishers.md#not-working).

## Reference

The `bids` entry's parameters — `networkId`, `host`, `placementKey`, `channel`, `customParams`,
`bidFloor` / `bidFloorCur` — are the table under
[Reference](https://epom.com/ad-server/docs/guides/inventory/header-bidding-for-publishers.md#reference) on the hub. The network's side of this
setup: [Header bidding on a site that runs its own Prebid.js](https://epom.com/ad-server/docs/guides/inventory/header-bidding-own-prebid-js.md).

## Related

- [Header bidding: what a publisher installs](https://epom.com/ad-server/docs/guides/inventory/header-bidding-for-publishers.md)
- [Install the header-bidding script on a page with Google Ad Manager](https://epom.com/ad-server/docs/guides/inventory/header-bidding-for-publishers-gam.md)
- [Install header bidding in an app with Prebid Mobile](https://epom.com/ad-server/docs/guides/inventory/header-bidding-for-publishers-prebid-mobile.md)
- [Header bidding on a site that runs its own Prebid.js](https://epom.com/ad-server/docs/guides/inventory/header-bidding-own-prebid-js.md)
- [Publisher playbook](https://epom.com/ad-server/docs/roles/publisher.md)