Multiformat
In a multiformat block, banners and videos compete in one auction. The ad with the higher bid is shown. More advertisers compete for the place, so revenue is usually higher than with a banner or a video alone.
Embed code
Paste the code where the block should be on the page. The block size must fit both a banner and a player.
<div id="ytrgt-3f9c2b7e5d1a4c6e8b0f2a9d7c5e3b1a"></div>
<script>
!function(w,d,s,o,f,js,fjs){w[o]=w[o]||function(){(w[o].q=w[o].q||[]).push(arguments)};w[o].q=w[o].q||[];js=d.createElement(s);fjs=d.getElementsByTagName(s)[0];js.async=1;js.src=f;fjs.parentNode.insertBefore(js,fjs)}(window,document,'script','ytrgt','https://cdn.example.com/runtime.js');
ytrgt('hb:load', '#ytrgt-3f9c2b7e5d1a4c6e8b0f2a9d7c5e3b1a', {"endpoint": "https://hb.example.com/hb", "publisherId": "3f9c2b7e5d1a4c6e8b0f2a9d7c5e3b1a", "sizes": [[300, 250]], "video": {"mimes": ["video/mp4"], "protocols": [2, 3, 5, 6]}, "videoOptions": {"muted": "auto", "skipDelay": 5}, "tmax": 1000, "showAdMark": true});
</script>One code, one place on the page. After you change the settings, copy the code again.
Settings

The settings are split into the Banner, Video and Common settings groups.
| Group | Field | Default | What it does |
|---|---|---|---|
| Banner | Sizes | 300×250 | Banner sizes, as for the banner |
| Video | Sound | Auto | As for the video |
| Video | Skip delay (sec) | 5 | After how many seconds the skip button appears |
| Video | Replay button | off | A replay button after the video ends |
| Common settings | Auction timeout (sec) | 1 | How long to wait for bids: from 0.1 to 3 seconds |
| Common settings | Show "Ad" label | on | The "Ad" label and advertiser details |
| Common settings | No-fill fallback | off | Collapse block or Show custom HTML, as for the banner |
Auction timeout (sec) is in the Advanced settings group at the bottom of the form.
Events
The same as for the banner: hb:win, hb:rendered, hb:nobid, hb:error. For how to subscribe, see the Events section of the Banner page.
Which ads are shown
Banner campaigns with suitable sizes and video campaigns with VAST videos.
Next steps
- More on sizes and the no-fill fallback: see Banner.
- No impressions or revenue