VAST examples / Document structure
An <Ad> containing both <InLine> and <Wrapper>
VAST 2.01 error1 warningVAST-2.0-ad-has-inline-or-wrapper
The scenario
A header-bidding wrapper vendor was merging responses from two upstream systems into a single ad object during a migration. The intent was a clean fallback, but the build accidentally emitted one <Ad> carrying both branches.
The broken tag
<?xml version="1.0" encoding="UTF-8"?>
<!-- ERROR: VAST-2.0-ad-has-inline-or-wrapper — <Ad> contains BOTH <InLine> and <Wrapper> -->
<VAST version="2.0">
<Ad id="ad-001">
<InLine>
<AdSystem>Test</AdSystem>
<AdTitle>Test Ad</AdTitle>
<Impression><![CDATA[https://track.example.com/impression]]></Impression>
<Creatives>
<Creative>
<Linear>
<Duration>00:00:30</Duration>
<MediaFiles>
<MediaFile delivery="progressive" type="video/mp4" width="1920" height="1080">
<![CDATA[https://cdn.example.com/video.mp4]]>
</MediaFile>
</MediaFiles>
</Linear>
</Creative>
</Creatives>
</InLine>
<Wrapper>
<AdSystem>Test Wrapper</AdSystem>
<Impression><![CDATA[https://track.example.com/wrapper-impression]]></Impression>
<VASTAdTagURI><![CDATA[https://ad.example.com/vast.xml]]></VASTAdTagURI>
</Wrapper>
</Ad>
</VAST>What the validator reports
Running this tag through vastlint produces the following. The primary failure for this example:
VAST-2.0-ad-has-inline-or-wrapperIAB VAST 2.0 §2.2line 4<Ad> must not contain both <InLine> and <Wrapper>
The same tag also surfaces these secondary findings — real tags rarely fail in isolation:
VAST-2.0-linear-tracking-quartilesIAB VAST 4.1 §3.14.2line 11<Linear> has no standard quartile tracking events (start/firstQuartile/midpoint/thirdQuartile/complete) — ad will serve but measurement system receives no signal
Why it breaks
The <Ad> element contains both an <InLine> and a <Wrapper> child. The spec is explicit that an Ad must contain exactly one of the two — either a self-contained InLine ad or a Wrapper that redirects to another VAST document, never both. The two represent mutually exclusive resolution paths, and a consumer cannot know which one is authoritative.
What it costs
Faced with an ambiguous Ad, players diverge: some take the InLine, some follow the Wrapper, some reject the whole Ad. That nondeterminism produces inconsistent creative delivery and tracking across the audience, corrupts attribution, and makes A/B reads unreliable. Strict consumers drop the Ad entirely, causing no-fill on a portion of traffic.
The fix
Split the two into separate <Ad> elements, or emit only the branch you intend. If you want fallback, use distinct Ads (optionally in a sequence/pod) rather than mixing InLine and Wrapper in one Ad.
<!-- one Ad = exactly one of InLine OR Wrapper -->
<Ad id="primary"><Wrapper>...</Wrapper></Ad>
<Ad id="fallback"><InLine>...</InLine></Ad>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
- An <Ad> with an invalid adType value — VAST-4.1-adtype-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
- An InLine ad missing the <AdTitle> element — VAST-2.0-inline-adtitle