siliconrelay.com

Installing the ad tag

Where to paste your zone snippet, the Standard vs SPA choice, and why a slot renders blank.


Each zone you create has its own snippet. Paste a zone's snippet into your page HTML wherever you want that ad to appear. The tag loads asynchronously and injects the winning banner in place — no layout shift, no blocking of your page.

Standard vs SPA

Every zone gives you two snippets, on tabs:

  • Standard — the declarative one-liner. Use this on ordinary pages that do a full load each time you navigate. Drop it where the ad should render and you're done.
  • SPA / dynamic pages — the command-queue version, for sites that navigate without a full page reload (single-page apps, client-side routers). After the initial load, call refresh() once per view to render ads for the new page, and destroy() to tear down the ads from the previous view before you swap content in. This keeps counts honest when the URL changes but the browser never reloads.

If you're not sure which you have: if clicking around your site triggers a full browser reload each time, use Standard. If it doesn't, use the SPA snippet.

Multiple zones on one page

You can place as many zones on a page as you like — one snippet per zone. Each renders independently and is billed independently. Don't reuse one zone's snippet in two spots; create a second zone instead, so your reporting can tell them apart.

Why a slot renders blank

A zone only fills when a size-matched, active campaign is available for that request. If a slot renders blank, the usual reasons are:

  • No active campaign currently matches that zone's size.
  • Targeting on the available campaigns excluded this visitor (geo, device, or schedule).
  • The snippet was pasted at a different size than the zone was created at — a zone's size is fixed when you create it.

Blank is a normal fill outcome, not an error. Your fill rate on the reporting page shows how often requests found an ad.