Skip to content

Video (outstream) ​

Outstream video shows a video ad in a block on the page, for example between paragraphs of an article. You do not need your own video player on the site: the player comes with the code.

Embed code ​

Paste the code where the video should be on the page.

html
<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", "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 ​

Publisher settings

FieldDefaultWhat it does
SoundAutoAuto: the video starts muted, and the visitor can turn on the sound. Always muted: the sound never turns on. With sound: the video starts with sound; the browser may block such autoplay
Skip delay (sec)5After how many seconds the skip button appears. 0 means no skip button. Empty means as set in the video itself
Replay buttonoffShows a replay button after the video ends
Auction timeout (sec)1How long to wait for bids: from 0.1 to 3 seconds
Show "Ad" labelonShows the "Ad" label and advertiser details
No-fill fallbackoffCollapse block or Show custom HTML, as for the banner
Floor price (CPM)emptyThe minimum price per 1,000 impressions in US dollars

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 ​

Video campaigns with VAST videos.

Next steps ​

  • Show a video or a banner in the block, whichever pays more: see Multiformat.

© Youtarget