HTML code and Template banners
Serve your own HTML/JS markup with the HTML Code type, or a rich-media system template with per-banner properties — which placements take each, how to check the creative with Preview, how passback works, and what to do when the Template list is empty or the save deletes data.
What it is and why
Two banner types serve markup instead of a plain file. HTML Code takes the markup you paste — a third-party ad tag, custom HTML/JS — and serves it verbatim with macros expanded. Template renders a rich-media template your network prepared (interstitial, catfish bar, interscroller, native block) from the properties you fill in per banner. Both render through Preview before they reach a page.
Example. Northwind Media gets a 300×250 JavaScript tag from an ad network for its sports sites. One HTML Code banner on a Site placement with the tag pasted into Code, Ad unit 300×250 and Enable passback functionality ticked lets the tag hand the slot back when it has no ad, so the next line of demand fills it instead of a blank. For a seasonal catfish bar the same campaign uses a Template banner: pick the network’s Catfish template, upload the 970×90 artwork and the click URL into its properties, and the template does the rest.
Typical scenarios
| You want | Set | Where |
|---|---|---|
| A third-party JavaScript tag on a 300×250 site slot | Banner type HTML Code, Ad unit 300×250, the tag in Code | Add new banner → Site placement |
| The same tag, but the slot must fall through when the tag is empty | Tick Enable passback functionality, save, reopen, paste the Banner passback code into the tag’s no-ad path | Needs the AJAX invocation-code permission and a configured AJAX domain |
| Custom markup inside a VAST response | HTML Code on a Video placement, Ad unit required; Return as iFrame ticked (default) wraps it in an iframe | Add new banner → Video placement |
| A catfish bar, interstitial or interscroller built by your network | Banner type Template → pick the template → fill its properties (artwork, URL, numbers) | Add new banner → Site / Non-standard / Mobile site / Application |
| An HTML5 ZIP creative | A Template whose property is a ZIP upload — HTML5 ZIP creatives | Template properties |
| A dynamic value in the markup (click URL, cache-buster, your own parameter) | $$CLICK_URL$$, $$RANDOM$$, custom parameters — expanded at serve time | Macros reference |
Step by step
Each type has its own page with the full steps; passback is set up the same way on both.
- HTML Code — set the type, pick the Ad unit where the placement asks for one, paste the markup into Code (macros expand at serve time), Return as iFrame on video, Save, then check it with Preview. HTML Code banners.
- Template — set the type, pick a Template from the list enabled for the placement type, fill in its properties (text, numbers, dropdowns, file uploads, From link or the Media library), Save, then Preview. Template banners.
- Passback — tick Enable passback functionality, save, reopen the banner and paste the Banner passback code into the creative’s no-ad path. Set up passback on a Code or Template banner.
Caveats and exceptions
Who can do this. HTML Code: anyone trafficking third-party tags or custom creatives on a campaign they can edit. Template: the stock Advertiser role has no Template banners — the network manager switches them on for the role; the templates themselves are authored in Templates. A Can view share sees the code editor, template combo and properties disabled under a Read-only pill; Preview and the passback code stay readable and copyable.
The caveats of one type are on its page: HTML Code banners (the markup is served verbatim), Template banners (an empty Template list, URL properties) and passback (the code block exists only on a saved banner).
Ad unit rules differ by placement. Required for a Code banner on Site and Video, optional on Mobile site, not shown on Non-standard and Application. An unsized mobile code banner saves fine and leaves the markup to size itself. For Template banners the Ad unit is never required.
Switching between HTML Code and Template and saving deletes the old type’s data. Saving as Template clears the stored image or video file name and the Title; saving as HTML Code clears the template, its property values, the stored files, the URL and the Title. Switching back does not restore them — copy the markup or note the property values first. Until you save, flipping the combo changes nothing.
Not working?
| Symptom | Check | Where |
|---|---|---|
| Markup, properties or files vanished after save | You switched the Banner type and saved | Re-paste from your copy; switching back does not restore |
| The creative renders in Preview but not on the page | Not linked to a placement, or the placement is a type this banner type is not offered on | Linked placements card; What each placement asks for |
The causes specific to one type are on its page: HTML Code banners, Template banners and passback.
Reference
What each placement asks for
| Placement | HTML Code | Template |
|---|---|---|
| Site | Ad unit required, Code, passback | Ad unit optional, Template, passback |
| Non-standard | Code, passback — no Ad unit field | Template, passback — no Ad unit field |
| Mobile site | Ad unit optional, Code, passback, Install conversion action | Ad unit optional, Template, Install conversion action — no passback |
| Video | Ad unit required, Code, Return as iFrame | not offered |
| Application | Code, Ad category, Application OS, Install conversion action, Customization parameters, and Display type when the category is Interstitial Ad on Android — no Ad unit, no passback | same, plus Target |
| Email, Native | not offered | not offered |
Options and fields
| Field | Type | What it does |
|---|---|---|
| Code | HTML Code | The markup that gets served, verbatim, with macros expanded. Required. |
| Template | Template | The system template to render. Required. Filtered by placement type. |
| Template properties | Template | Per-banner values for the template’s own fields. A property marked required blocks the save until it is filled; a file property keeps its existing file if you save without picking a new one. |
| Ad unit / Width / Height | both | Creative size. Custom reveals manual width and height inputs. |
| Return as iFrame | HTML Code, Video | Wraps the markup in an iframe inside the VAST response. Ticked by default. |
| Enable passback functionality | both | See Set up passback. Site / Non-standard / Mobile site for Code; Site / Non-standard for Template. |
| Target | Template, Application | Which browser window the click opens. |
| Preview | both | Header button, available once the banner is saved. |
Related
- HTML Code banners
- Template banners
- Set up passback on a Code or Template banner
- Banner types — decision guide
- Create and manage banner templates — building the templates this page consumes
- Serve an HTML5 creative from a ZIP bundle
- Macros reference
- Daisy chaining and passback
- Bulk banner operations — mass-updating template properties
- Catfish, sticky, branding (skin) and interstitial formats — formats built on templates, and their sizing, click and “not showing” checklists