View as Markdown

Web and TV-browser players

This guide covers serving Ezoic video ads from browser-based players, on desktop and mobile web and on smart-TV browsers. This is the website lane. Identity comes from your page URL, not from an app bundle.

Tag template

https://g.ezoic.net/ezoic/videoad/vast?url=<ENCODED_PAGE_URL>&adunit=<YOUR_VIDEO_AD_UNIT>&devicetype=<3 on TV browsers>&plcmt=1&v=4&w=<PLAYER_W>&h=<PLAYER_H>&startdelay=0&content_id=<ID>&content_title=<TITLE>&content_cat=<IAB_CAT>&content_len=<SECONDS>&us_privacy=<USP>&gdpr=<0|1>&consent=<TCF>&cb=<RANDOM>
  • url is the full, URL-encoded page URL. It maps the request to your Ezoic property, so the page must be on a domain that is active with Ezoic.
  • Send devicetype=3 on TV-browser deployments. Leave it out on desktop and mobile web.
  • The open web has no ifa. The browser identity applies to the request itself. If you have universal IDs such as UID2 or RampID, pass them in eids.
  • The endpoint is CORS-enabled and answers OPTIONS preflights. XHR and fetch-based players, including IMA HTML5, work without a proxy.

IMA HTML5

const adsLoader = new google.ima.AdsLoader(adDisplayContainer);
const request = new google.ima.AdsRequest();
request.adTagUrl = buildEzoicTagUrl();
request.linearAdSlotWidth = playerWidth;
request.linearAdSlotHeight = playerHeight;
adsLoader.requestAds(request);

video.js with videojs-ima

player.ima({ adTagUrl: buildEzoicTagUrl() });

JW Player

jwplayer("player").setup({
  file: contentUrl,
  advertising: { client: "vast", tag: buildEzoicTagUrl() }
});

For all three, rebuild the tag URL at each ad break, with a fresh cb and the correct startdelay. Do not reuse one URL.

Most browser integrations run a consent management platform (CMP). Pass its output through:

gdpr=<applies>&consent=<TCF string>&us_privacy=<USP string>&gpp=<GPP>&gpp_sid=<sections>

If your CMP exposes macros, check that they expand. An unexpanded literal is dropped, and the consent signal is lost without an error.

Behaviour notes

  • An empty VAST document is a no-fill. IMA and JW Player raise their standard "empty response" error. Continue to content.
  • If your player autoplays muted, declare it with playbackmethod=2. Sound-on autoplay is 1. Click-to-play is 3.
  • Responses are never cached. Still send cb to defeat intermediaries.

Go-live checklist

  • url is a real page URL on your Ezoic-active domain, URL-encoded
  • adunit is set to your normal video ad unit name
  • devicetype=3 on TV-browser deployments
  • Real player w and h, startdelay sent, and a fresh URL for each break
  • CMP signals are wired, and you have checked that they expand
  • Content metadata is populated