Video Tags: A Complete Guide to VAST and Video Ad Delivery

Last updated: February 2025 · 10 min read

What you will learn

  • What video ad tags are and why they exist
  • How VAST and VMAP specifications structure video ad delivery
  • The difference between inline ads and wrapper chains
  • How to validate and troubleshoot video tags before launch
  • Common issues that cause video ad delivery failures

What Is a Video Ad Tag?

A video ad tag is a structured XML document that tells a video player everything it needs to know to deliver an advertisement. Think of it as a set of instructions: the tag specifies where the video creative file is hosted, what tracking events the player should report (such as the ad starting, reaching the midpoint, or completing), where to send impression data, and what to do if something goes wrong.

When a user visits a web page or opens an app that contains a video player, the player requests an ad from an ad server. The ad server responds with a video ad tag — typically in the VAST (Video Ad Serving Template) format — that the player parses and follows. The player downloads the creative file specified in the tag, renders it in the video container, and fires the tracking events at the appropriate moments during playback.

This standardized approach allows any compliant video player to work with any compliant ad server, creating the interoperability that makes programmatic video advertising possible. Without video ad tags, each ad server–player combination would need custom integration code, making the ecosystem unscalable.

Understanding the VAST Specification

VAST is the dominant standard for video ad tags, maintained by the IAB Tech Lab. The specification defines the XML schema that ad servers use to communicate with video players. A VAST response contains several key elements that work together to deliver a complete ad experience.

The Ad element is the top-level container for a single advertisement. Within it, the InLine element (for direct ad responses) or the Wrapper element (for redirects to other VAST tags) defines how the ad is structured. An InLine ad contains the actual creative information, while a Wrapper points to another VAST URL that the player must follow to find the creative.

Inside an InLine ad, the Creatives section lists one or more creative assets. The MediaFile element specifies the URL, MIME type, bitrate, dimensions, and delivery method for each video file. The TrackingEvents section defines URLs that the player must request at specific moments: start, firstQuartile, midpoint, thirdQuartile, and complete are the standard playback milestones. The Impression element contains the URL that should be fired when the ad is displayed.

VAST Versions at a Glance

VersionKey Features
VAST 2.0Foundation spec: linear ads, companion ads, basic tracking events
VAST 3.0Ad pods (multi-ad sequences), skippable ads, industry icons
VAST 4.0Mezzanine files, universal ad IDs, server-side ad insertion support
VAST 4.1 / 4.2Verification scripts, improved error codes, interactive creative support

Inline Tags vs. Wrapper Chains

The distinction between inline and wrapper VAST responses is one of the most important concepts to understand when working with video ad tags. An inline VAST response contains everything the player needs: the creative file URL, tracking events, impression pixels, and any companion ads. When a player receives an inline response, it can begin loading and playing the ad immediately.

A wrapper response, by contrast, does not contain the creative. Instead, it contains a VASTAdTagURI element that points to another VAST endpoint. The player must follow this redirect, requesting the next VAST URL and parsing the result. This chain can extend through multiple wrappers before reaching an inline response with the actual media file.

Wrapper chains serve critical business functions in programmatic advertising. Each participant in the ad supply chain — the demand-side platform, the supply-side platform, verification vendors, the advertiser's ad server — may add a wrapper layer to inject their own tracking pixels and reporting endpoints. While this enables multi-party measurement, it also adds latency (each hop requires an HTTP request) and introduces potential failure points (any wrapper in the chain can fail, blocking the entire ad).

Most players enforce a wrapper depth limit (typically 5 hops) to prevent infinite loops and excessive latency. If a wrapper chain exceeds this limit, the player will reject the ad. Understanding and monitoring wrapper depth is an important part of video ad QA.

VMAP: Scheduling Multiple Ads in Video Content

While VAST describes a single ad, VMAP (Video Multiple Ad Playlist) describes when and where ads should appear within a video content timeline. A VMAP response defines ad breaks — pre-roll (before content), mid-roll (during content), and post-roll (after content) — and points to VAST tags for each break. This separation of scheduling (VMAP) from creative delivery (VAST) gives publishers and ad servers fine-grained control over the viewer experience.

A typical VMAP response might specify a pre-roll ad break at the beginning of the video, mid-roll breaks at the 5-minute and 10-minute marks, and a post-roll at the end. Each break references one or more VAST tag URLs that the player requests when the break is triggered. This architecture allows dynamic ad insertion, where the specific ads served can change based on real-time bidding while the schedule remains consistent.

How to Validate Video Tags Before Launch

Validating video tags before a campaign goes live is a critical QA step that prevents ad delivery failures, tracking discrepancies, and wasted spend. A systematic validation process checks multiple aspects of the tag:

  1. Tag loading: Does the VAST URL return a valid XML response? Is the response well-formed and conformant to the VAST schema? Network errors, authentication requirements, or malformed XML at this stage will prevent any ad from loading.
  2. Wrapper resolution: If the tag uses wrappers, does the chain resolve successfully to an inline response? How many hops are in the chain? Is the total resolution time acceptable? Chains that exceed the player's depth limit or take too long will result in ad timeouts.
  3. Creative availability: Are the media file URLs in the inline response accessible? Do they point to valid video files in supported formats? A tag that resolves correctly but references broken or incompatible media files will fail at playback.
  4. Tracking verification: Are impression and tracking event URLs properly formed? Do they include the expected macros and parameters? Tracking issues do not prevent ad playback but cause measurement discrepancies between parties.
  5. Playback simulation: Does the ad actually play in a test environment? Do the tracking events fire at the correct moments? Playback simulation catches issues that structural validation alone cannot detect, such as codec incompatibilities or creative rendering problems.

The VAST Inspector tool automates this validation workflow, allowing you to paste a VAST URL or XML, inspect the parsed structure, follow wrapper chains, and simulate playback with event tracking in a single step.

Common Video Tag Issues and How to Fix Them

Tag loading failures

The most common reason a video tag fails to load is that the VAST URL is unreachable — the domain is down, the endpoint requires authentication, or the response is not valid XML. If the tag URL works in a browser but fails in a player, check whether the ad server requires specific headers, cookies, or user-agent strings that the player does not provide.

Empty VAST responses

An empty VAST response (a valid VAST XML with no Ad elements) typically means the ad server decided not to fill the request. This can happen due to targeting restrictions, budget exhaustion, frequency capping, or geographic filtering. While not a tag error, frequent empty responses indicate a configuration or inventory issue that needs attention.

Wrapper chain failures

When a wrapper chain fails, the error usually occurs at a specific hop. One common pattern is a wrapper that points to a URL that returns a non-VAST response (HTML error page, JSON, or plain text). Another is a wrapper loop where two wrappers point to each other, creating an infinite chain that the player eventually terminates. Tracing the chain hop by hop reveals the exact point of failure.

Media file incompatibility

Even when the tag resolves correctly, the creative file might not play. Common causes include unsupported codecs (VP9 on older devices), incorrect MIME types (video/mp4 declared for a WebM file), or file sizes that exceed the player's limits. Ensuring that media files use widely supported codecs (H.264 for video, AAC for audio) and accurate MIME type declarations prevents most playback issues.

Best Practices for Video Ad Tag Management

  • Always validate before launch. Test every tag in a controlled environment before it enters live ad serving. Catching issues before launch prevents wasted impressions and revenue loss.
  • Monitor wrapper depth. Keep wrapper chains as short as possible. Each additional hop adds latency and another potential failure point. Aim for three hops or fewer when possible.
  • Use HTTPS everywhere. Mixed content (HTTP media files served on HTTPS pages) will be blocked by modern browsers. Ensure all URLs in the tag — creative files, tracking pixels, wrapper URIs — use HTTPS.
  • Include fallback creatives. Where possible, include multiple MediaFile elements with different formats and bitrates. This allows the player to select the most compatible option for the user's device and connection.
  • Test across devices. Video playback behavior varies significantly across desktop browsers, mobile browsers, and connected TV platforms. Test tags on representative devices from each category your campaign targets.

Related Resources