VAST companion ads
Companion ads are display ads served alongside a video ad, rendered outside the video player — typically in a banner slot next to or below the player. They are defined in the VAST tag and rendered by the page or app, not by the video player itself. Companions persist after the video ad ends, extending the brand's presence while content plays.
Companion ads are optional in VAST but frequently required by premium publishers and DSPs for brand campaigns. They are the second most commonly malformed element in VAST tags after tracking events.
Quick reference
| Creative element | <CompanionAds> containing <Companion> |
| Resource types | StaticResource, IFrameResource, HTMLResource |
| Required attributes | width, height on each <Companion> |
| required attribute | all, any, or none on <CompanionAds> |
| CTV support | Mostly ignored on CTV; primarily a web/mobile format |
CompanionAds element structure
Companion ads live in a separate <Creative> element alongside the linear creative. The required attribute on <CompanionAds> tells the player whether companions are mandatory for the ad to be eligible:
all— all companions must be displayable or the linear ad is skippedany— at least one companion must be displayablenone— companions are optional (default)
<VAST version="4.2">
<Ad id="1">
<InLine>
<AdSystem>My Ad Server</AdSystem>
<AdTitle>Video Ad with Companions</AdTitle>
<Impression id="imp1"><![CDATA[https://track.example.com/impression]]></Impression>
<Creatives>
<!-- The linear video creative -->
<Creative id="linear1" sequence="1">
<Linear>
<Duration>00:00:30</Duration>
<TrackingEvents>...</TrackingEvents>
<MediaFiles>...</MediaFiles>
</Linear>
</Creative>
<!-- Companion display ads — rendered outside the video player -->
<Creative id="companions1" sequence="1">
<CompanionAds required="any">
<!-- 300x250 rectangle -->
<Companion id="c1" width="300" height="250">
<StaticResource creativeType="image/png">
<![CDATA[https://cdn.example.com/companion-300x250.png]]>
</StaticResource>
<CompanionClickThrough>
<![CDATA[https://example.com/landing]]>
</CompanionClickThrough>
<CompanionClickTracking id="ctrack1">
<![CDATA[https://track.example.com/companion-click]]>
</CompanionClickTracking>
<TrackingEvents>
<Tracking event="creativeView">
<![CDATA[https://track.example.com/companion-view]]>
</Tracking>
</TrackingEvents>
</Companion>
<!-- 728x90 leaderboard -->
<Companion id="c2" width="728" height="90">
<StaticResource creativeType="image/png">
<![CDATA[https://cdn.example.com/companion-728x90.png]]>
</StaticResource>
<CompanionClickThrough>
<![CDATA[https://example.com/landing]]>
</CompanionClickThrough>
</Companion>
</CompanionAds>
</Creative>
</Creatives>
</InLine>
</Ad>
</VAST>Resource types
Each <Companion> must contain exactly one resource element:
| Element | Description |
|---|---|
StaticResource | Image, animated GIF, or video file. The creativeType attribute is required and must be a valid MIME type (image/png, image/gif,image/jpeg, application/x-shockwave-flash). |
IFrameResource | URL of an HTML page loaded in a sandboxed iframe. The companion clicks are handled within the iframe; CompanionClickThrough is not needed. |
HTMLResource | Inline HTML injected directly into the companion ad container. Useful for rich interactive companions. |
<!-- StaticResource companion (most common) -->
<Companion width="300" height="250">
<StaticResource creativeType="image/png">
<![CDATA[https://cdn.example.com/companion.png]]>
</StaticResource>
<CompanionClickThrough><![CDATA[https://example.com/]]></CompanionClickThrough>
</Companion>
<!-- IFrameResource companion -->
<Companion width="300" height="250">
<IFrameResource><![CDATA[https://cdn.example.com/companion.html]]></IFrameResource>
</Companion>
<!-- HTMLResource companion -->
<Companion width="300" height="250">
<HTMLResource><![CDATA[
<a href="https://example.com/" target="_blank">
<img src="https://cdn.example.com/companion.png" width="300" height="250" border="0"/>
</a>
]]></HTMLResource>
</Companion>Companion tracking events
Each <Companion> can have its own <TrackingEvents>block. The most common event is creativeView, which fires when the companion is rendered in the slot.
Note: the companion creativeView event fires independently of the linear ad's <Impression>. Publishers may render the companion before or after the linear ad fires its impression.
Multiple sizes and the required attribute
Provide multiple <Companion> elements at different sizes to match the available slots on different pages or apps. The player selects the companion whose dimensions match the available slot. Common sizes:
- 300×250 (medium rectangle — most universal)
- 728×90 (leaderboard — desktop web)
- 160×600 (wide skyscraper — desktop web)
- 320×50 (mobile banner)
- 300×600 (half page)
Setting required="any" on <CompanionAds> means the linear ad will only be delivered if at least one companion size matches an available slot. Use required="none" for maximum fill rate — the linear ad will always deliver regardless of companion availability.
Common mistakes checklist
- Missing width or height on Companion — required attributes. Without them, the player cannot match the companion to a slot.
- Missing creativeType on StaticResource — required attribute. Without it, the player cannot determine how to render the resource.
- required="all" with many sizes — if none of the companion sizes match a slot on the page, the entire ad (including the video) will not deliver. Use
required="any"orrequired="none"for better fill rates. - No fallback companion sizes — providing only one size will cause companions to never render on pages with different slot configurations. Provide at least 300×250 and one large-format size.
- TrackingEvents outside Companion — companion tracking events go inside the
<Companion>element, not in the parent<CompanionAds>. - Expecting CTV support — most CTV platforms do not support companion ads and will silently ignore
<CompanionAds>.