VAST examples / Companions
A <Companion> banner with no width or height
VAST 2.00 errors1 warningVAST-2.0-companion-dimensions
The scenario
A publisher sold a video-plus-companion package: a pre-roll on the player and a synchronized banner in a fixed slot beside it. The companion is meant to fill a specific 300×250 display area while the video plays.
The broken tag
<VAST version="2.0">
<Ad id="1">
<InLine>
<AdSystem>Test</AdSystem>
<AdTitle>Test</AdTitle>
<Impression>https://t.example.com/imp</Impression>
<Creatives>
<Creative>
<CompanionAds>
<!-- missing width and height on Companion -->
<Companion>
<StaticResource creativeType="image/png">https://cdn.example.com/banner.png</StaticResource>
</Companion>
</CompanionAds>
</Creative>
</Creatives>
</InLine>
</Ad>
</VAST>What the validator reports
Running this tag through vastlint produces the following. The primary failure for this example:
VAST-2.0-companion-dimensionsIAB VAST 2.0 §2.3.7.1line 11Companion is missing width or height — required by spec, optional in XSD
Why it breaks
The <Companion> element provides a resource but no width and height attributes. Companion dimensions are required so the player can match the companion to an available display slot of the right size. Without them, the player cannot decide whether the companion fits the 300×250 region, so it has no safe way to place the banner.
What it costs
The companion banner goes unfilled even though the video ad plays, so the publisher delivers only half of the package they sold and the advertiser loses the synchronized display reinforcement they paid for. On a bundled CPM, the missing companion can also trip make-good clauses tied to companion delivery.
The fix
Add width and height to every <Companion> matching the intended slot, and make sure the supplied resource actually renders at that size. Provide companions for each slot size you committed to.
<Companion width="300" height="250">
<StaticResource creativeType="image/png">
<![CDATA[https://cdn.example.com/companion-300x250.png]]></StaticResource>
<CompanionClickThrough><![CDATA[https://example.com/lp]]></CompanionClickThrough>
</Companion>VAST XML fragment only. This excerpt belongs inside a complete VAST document, so standalone validation will fail until it is wrapped in a full <VAST>response.
Check your own version of this tag
Paste the resolved XML to run the same spec check, test a live tag URL, or inspect the wrapper chain hop by hop.
Related examples
- A companion <ClickTracking> with no id — VAST-4.0-companion-clicktracking-id
- A <Companion> with an invalid renderingMode — VAST-4.1-companion-renderingmode-value
- An InLine ad with no <Impression> element — VAST-2.0-inline-impression
- An InLine ad missing the <AdSystem> element — VAST-2.0-inline-adsystem