Browse the help center

Ad tags, invocation codes and the API

Take a placement's ad tag live from the Ad tags & API card — which tag type to pick for a web page, a single-page app, a player or a newsletter, the Settings tab (domain, protocol, ad wrapper, fit container) and the default parameters every tag carries, installing it on WordPress or another CMS — step by step, with the caveats, a fix-it checklist and the tag-type matrix.

How-to network manager publisher admin Account → Publishers → site → zone → placement → Ad tags & API

What it is and why

The Ad tags & API card on a placement is where inventory turns into code: one tab per tag type the placement offers, a Settings tab with the knobs that shape every tag (serving domain, protocol, ad wrapper, fit container) and the default parameters appended to every tag, and — for API-served types — the integration documentation. A tag is plain HTML or a URL; you copy it once and paste it where the ad should appear, and later changes are made on the placement, not in the pasted code.

Example. A news publisher’s Article MPU 300×250 is a Site placement. On its card the Universal JS tab gives an <ins> slot plus one <script async>; the Settings tab sets Domain to the network’s ads.example.com, Protocol to Relative and adds a default Channel of article. The publisher pastes the tag into a WordPress Custom HTML block, and every impression from that block arrives labelled with the article channel.

Typical scenarios

You wantTakeWhere
An ad in an ordinary web page, widget or templateUniversal JSSite, Mobile site, Non-standard placements
A single-page app or a theme that inserts the slot after the page has loadedMount JS (or the <ins> plus init() from the JavaScript API)Site, Mobile site, Non-standard
A site builder that strips <script> from pasted HTMLSimple IframeSite placements, if your role has it
A system that fetches the ad markup itselfDirect URL, or the API tab’s request URLSite, Mobile site, Non-standard; API on Native and Application too
A video playerVAST tags — a VAST URL with a version picker (2.0 – 4.3, default 4.2), plus VPAID and VMAP URLs; Video Player for a ready demo embedVideo placements
A newsletterthe Email tab — an image + click URL pairEmail placements
Affiliate traffic from Everflow, TUNE or Affise identified per partnerdefault parameters Partner Sub-value sub1 … sub10 with the partner’s macro as the valueSettings tab
The page’s consent passed into every requestdefault parameters GDPR Applies ${GDPR} and IAB TCF Consent String ${GDPR_CONSENT_849}Settings tab

Which tabs a given placement type offers, and which need a permission, is in the tag-type matrix under Reference.

Step by step

  1. Open the placement (Account → Publishers → site → zone → placement) and find Ad tags & API. The card exists once the placement is saved and switched on; it opens on the placement’s first available tab.

    Ad tags & API card with the Universal JS tab and the generated code

  2. Pick the tab that matches your integration (table above). The Universal JS / Mount JS tab shows the generated code and a collapsible JavaScript API block.

  3. Copy the code with the copy button, or use the download button to save it as a file.

  4. Open the Settings tab — the last tab in the strip, on editable placements only. The controls row at the top shapes the code on every tab; each change re-generates the code and saves on the placement (a Done toast confirms it):

    • Domain — the ad-serving domain the tag or URL calls, picked from the network’s tag domains, the default one first;
    • Protocol — Relative (//, the tag takes the page’s own scheme), HTTPS or HTTP;
    • Ad wrapper — how the ad server hands the creative to the page: Without Wrapper, Friendly Frame, Sandboxed Frame or No-redirect Frame (JS tags only; details under Reference);
    • Fit container — stretches the ad’s frame to its container (Mobile Site and Non-standard only);
    • Scale to container width — enlarges or reduces a fixed-size creative proportionally to the width of its slot, up to an optional Max height, px. Shown when your role holds Placement Scale to Container Width; it and Fit container exclude each other.

    Settings tab with the Domain, Ad wrapper and Protocol controls and the default parameters grid

  5. Below the controls, under Default parameters added to every tag generated for this placement., add the parameters every tag should carry: pick a Parameter type, type a Default value (it cannot be blank) and click Add. The grid lists each row with Type and Default value and a delete button. Adding or deleting a row re-generates the code on all tabs at once; each change is recorded in the action log. The types — Channel, Custom Parameter, Partner Sub-value, 3rd Party Click Tracking Url and the pass-through signals — are under Reference.

  6. Paste the tag into your page, player or app and verify it on the preview page.

Install a tag on WordPress or another CMS

There is no Epom plugin for WordPress or any other CMS, and none is needed: a tag is plain HTML that you paste where the ad should appear. Use the Universal JS tag on web pages.

  • Inside a post or page (WordPress block editor): add a Custom HTML block at the spot and paste the whole tag.
  • In a sidebar, header or footer area: add a Custom HTML widget to that area and paste the tag.
  • In a theme template, on every page: put the <ins> where the slot belongs. The <script> is the same for every placement on the same serving domain, so with several slots you can load it once — in the theme’s footer, for example — and paste only the <ins> lines in the slots.
  • Other site builders work the same way: use their custom-HTML or embed-code element, not a plain text field, which would show the code as text.

Which tag to take:

SituationTag
Ordinary pages, widgets, templatesUniversal JS
A theme or app that inserts the slot with its own script after the page has loadedMount JS, or the <ins> plus init() — see The JavaScript API
A builder that strips <script> from pasted HTMLSimple Iframe (Site placements, if your role has it)
A newsletter templateThe Email tab of an Email placement

Paste as an Administrator: WordPress saves a <script> only for users allowed to post unfiltered HTML (on a single site, Administrators and Editors); for anyone else it strips the script on save and only the empty <ins> is left. Keep the <ins> exactly as copied — optimisation or theme tools that add a CSS class or an id to it make the loader skip the slot. Page-caching plugins are no problem: the page can be cached, because the ad is requested by the visitor’s browser on every view. There is no AMP-specific tag type; for header bidding through Prebid the page takes a different script, placed above the Google tag and without async — see Header bidding: what a publisher installs.

The API tab’s request URL and parameters, the VAST and Email tabs in detail, the loader’s JavaScript API and the same tags over REST are on API tab, VAST tags and the JavaScript API; the copy-tag quick action and the preview page on Copy and preview an ad tag; iframes, custom containers, Google Ad Manager, slot sizing, several tags per page and auto-refresh on the Ad tag FAQ.

Caveats and exceptions

Who can do this. Publishers taking tags live and network managers supporting them. The card is on every saved placement that offers at least one tag tab; which tabs a given user gets is decided by per-tag-type permissions — one set per placement family, so a role can hold Universal JS on Site placements and not on Mobile ones. VAST tags, Video Player and Email need no grant. If a tab you need is missing, ask your network admin for it; the Universal JS grants are set only on Admin → Users & access → Admin roles & permissions. Changing the Settings (domain, wrapper, protocol, fit container) or the default parameters needs update rights on the placement’s site — they persist on the placement, they are not per-copy options; a Can View share keeps the tags copyable but has no Settings tab. Exact grants: User roles.

The card disappears while the placement is off. It does not exist before the first save, and it disappears while the Active switch is off — straight away, before you save.

Universal JS and Mount JS need an ad-serving domain to exist. Both tabs are suppressed — on Site, Mobile Site and Non-standard alike — unless the network has at least one ad-serving domain (ask your network or Epom support to add one; ad-serving domains are added by Epom support on request). On a network with none, each placement keeps only the tabs your role’s other permissions allow, and a placement left with none has no Ad tags & API card at all. For the stock Publisher, whose only tag on Site and Mobile Site placements is Universal JS, that means both lose the card, while a Non-standard placement keeps Direct URL. A role that holds Simple Iframe, Direct URL or API keeps those tabs. That is configuration, not a permission: granting Universal JS changes nothing until a domain exists. Over the REST API and the AI assistant, asking for either tag on such a network answers 400 with the reason.

The Domain selector appears as soon as one serving domain is configured — it does not wait for a second one. If it is missing entirely, either the network has no ad-serving domain at all or your role lacks Set Ad-Serving Domain (Placement); the Protocol control shows either way.

The Settings persist on the placement, not on the copied snippet — but not all behave the same. Domain and Protocol are written into the tag’s script URL when you copy it, so changing them alters what colleagues copy next while tags already on pages keep the domain they were copied with. Ad wrapper, Fit container and Scale to container width are not in the snippet at all: the ad server attaches them to every response, so changing any of them changes the tags already live on pages as soon as the ad cache next reloads.

Scale to container width works from the creative’s declared size, and never cuts it. The tag scales by the width the slot leaves after the page’s own margins and padding, recomputes when that width changes (a phone rotated, an app relayout), and stops at whichever comes first: the full width, Max height, or a height or max-height the page set on the slot’s container — a 320×50 in a strip fixed at 50 pixels simply stays 320×50. A container only a few pixels wide is taken as not laid out yet: the ad keeps its own size until a real width arrives. An image creative enlarged by a third looks slightly softer; HTML and third-party tag creatives scale cleanly. The option shapes the Universal JS and Mount JS tags only: header-bidding slots are sized by their own settings.

In an app, the WebView has to follow the ad’s height every time it changes. The page cannot see or change the WebView’s own height. An app that measures the ad once, or pins the WebView to a fixed height, crops a scaled ad at the bottom — keep the option off on such slots until the app re-measures on change, or limit it with Max height.

Click-through placements have no tags at all — the card carries their tracking URLs instead (see Click-through placements).

What Mount JS expects. The snippet is a bare function call whose last line is })(container, opts);. Paste it inside a <script> of your own where container (the element the slot goes into) and opts are in scope; if container is undefined it falls back to the element right after the script. opts can override the defaults baked in from the Settings tab: channel, click, customParams (a list of one-key objects), bundle and ifa. It then calls the loader’s init() (see The JavaScript API), or loads the loader the first time.

If you still have an old tag on a page, act on it. The synchronous/asynchronous iframe and JS pairs, API JS Sync and the Lite tag are retired, and the URLs they call have been switched off — a page still carrying one serves nothing and reports nothing. The retired types, what each calls and what to re-issue it as are listed under Retired code types. (JSP and PHP are the exception: they call the still-live ad API and keep working.)

Pass-through defaults are macros, emitted verbatim. The GDPR / IFA / bundle defaults are usually macros (${GDPR}, …). They are emitted verbatim — never url-encoded — into tags and URLs, so the caller’s CMP can substitute them. If a downstream system leaves the macro unsubstituted, the ad server receives the literal macro text (treated as absent), never a broken %24%7B…%7D string.

A Partner Sub-value outside sub1 … sub10 is refused. Over the API anything outside those ten is a 400, because a typo would otherwise ship as an ordinary request parameter and go missing at conversion time; the console offers only the ten in a pick-list.

Not working?

  • The tab you need is missing. Where: your role’s per-tag-type permission for that placement family (Universal JS grants are on Admin → Users & access → Admin roles & permissions), and for Universal JS / Mount JS the network’s ad-serving domains — with none, both tabs are off network-wide.
  • No Ad tags & API card. Where: the placement’s Active switch (the card hides while off), whether the placement has ever been saved, and the tag types left to your role — a placement with no tab at all has no card. Click-through placements never have tags.
  • The pasted tag serves nothing and reports nothing. Where: the tag’s script URL — a retired type calls a URL that has been switched off; re-issue it from the card. See Retired code types.
  • Only an empty <ins> survived in WordPress. Where: the WordPress user’s rights — paste as an Administrator, since other roles have the <script> stripped on save.
  • The loader skips the slot. Where: the <ins> in the page source — a class or id added by an optimisation or theme plugin makes the loader skip it; restore it exactly as copied.
  • Colleagues copy a tag with the old domain. Where: the Settings tab — Domain and Protocol are baked into the snippet at copy time; tags already on pages keep what they were copied with.
  • Live pages changed although nobody re-pasted. Where: the Ad wrapper and Fit container settings — they travel with every ad response, so a change reaches pages already live on the next ad-cache reload.
  • No Domain selector. Where: the network’s ad-serving domains (none configured) or your role’s Set Ad-Serving Domain (Placement); Protocol shows either way.
  • A default parameter arrives as literal ${GDPR}. Where: the upstream player or CMP — the macro is emitted verbatim for it to substitute; the ad server treats an unsubstituted macro as absent.
  • A Partner Sub-value is refused with 400. Where: the key — only sub1 … sub10 are accepted.
  • The ad looks wrong in the page. Iframes and the ad wrapper, custom containers, slot sizing and layout shift are on the Ad tag FAQ; the preview page is on Copy and preview an ad tag.

Reference

The essentials are below; the full tab-by-placement-type matrix, every Settings control with its options, and every default parameter type are on the subpage Ad tags & API card reference.

PageRead it for
Ad tags & API card referenceWhich tag types each placement type offers, The Settings controls, Default parameters
API tab, VAST tags and the JavaScript APIThe API tab’s request URL and parameters, the VAST tags and Email tabs, the loader’s JavaScript API, tags and default parameters over REST
Invocation codes referenceThe full matrix and per-type markup samples
ControlThe essentials
DomainThe ad-serving domain every URL of the placement is built on; needs a tag domain on the network and Set Ad-Serving Domain (Placement)
ProtocolRelative (//), HTTPS or HTTP
Ad wrapperHow the creative is handed to the page: Without Wrapper, Friendly Frame, Sandboxed Frame, No-redirect Frame — JS tags on Site, Mobile Site and Non-standard placements only
Fit containerStretches the ad’s frame to its container on Mobile Site and Non-standard placements
Scale to container widthScales a fixed-size creative proportionally to its slot’s width, never past the slot’s fixed height or Max height; needs Placement Scale to Container Width
Default parametersChannel, Custom Parameter, Partner Sub-value, 3rd Party Click Tracking Url and the macro-fed parameters, appended to every tag, URL and VAST/VMAP tag of the placement

Per-role notes

  • Publisher and network manager — see only the tag tabs their role grants; VAST tags, Video Player and Email need no grant. If Universal JS is missing, check the role, then the network’s ad-serving domains.
  • Administrator — ad-serving domains are added by Epom support on request; with none, Universal JS and Mount JS are off network-wide.
  • Can View share — tags stay copyable, but the Settings tab (domain, wrapper, protocol, fit container) is absent.

Exact grants: see User roles.

Related pages:

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.