What are VAST Tags (AVOD) and How Do They Work?

Advertising-based monetization (AVOD – Advertising-Based Video On Demand or Ad Insertion in linear/live TV) is a critical revenue generator for hundreds of publishers and content providers in the world.

By leveraging the power of advertising, content providers have been able to subsidize or provide their content for free – allowing millions of users to enjoy the latest videos on-demand or live. This is in contrast to other monetization schemes like SVOD, TVOD, and PVOD where you (almost always) must pay before you can watch anything.

However, ad insertion is not easy and involves several moving parts that must work together harmoniously. There is engineering involved in preparing the ads for delivery, communicating between an ad server and a media player, the delivery process, quality assurance, and ad analytics – all aimed at ensuring that your experience is good!

In today’s tech deep-dive, let’s look at one of the several parts that make up the ad-delivery ecosystem – the VAST tag. Let’s understand what VAST is and how it is defined.

What is VAST?

VAST (Video Ad Serving Template) is defined by the IAB (Interactive Advertising Bureau) as follows –

VAST is a template for structuring ad tags that serve video and audio ads to media players. Using an XML schema, VAST transfers important metadata about an ad from the ad server to a media player.

Launched in 2008, VAST has played an important role in developing a universal standard in ad delivery. A universally accepted standard allows for interoperability, compatibility, and a clean break in the interfaces to drive plug-and-play product design and development.

A VAST tag is an XML Schema containing details on where to download the ad’s media, identifiers, length, format, duration, tracking information, pricing, etc.

In this article, we look at how VAST works and some of the important metadata usually present in a VAST tag. Let’s look at some of the important XML tags in the VAST template.

How does VAST Work?

In general, ads can be served either client-side or server-side. We will do a deep dive into the differences between client-side ad insertion and server-side ad insertion in a future article, but, for now, let’s understand the basic difference.

  • Client-Side Ad Insertion: The client (media player) requests ads from an ad server and displays them to the end user at the appropriate time.
  • Server-side Ad Insertion: here, the server stitches ads into the media directly and then serves the ad to the media player.

You can see how Client-Side Ad Insertion works from this diagram provided by IAB.

  1. when the player reaches an ad cue-point during video playback, it sends a VAST request to an ad server.
  2. the ad server responds with a VAST that might be an In-Line response with information to play the ad or a Wrapper response to redirect the player to another server.
  3. this continues until the player has received an InLine response, at which point it can execute the ad.
VAST Video Ad Serving Template
From IAB

With that understanding of how VAST works, let’s look at a VAST tag and understand what the different XML elements mean and how they can be used.

AdSystem in VAST

The adsystem element indicates a descriptive name for the system that serves the ad. This element can include an optional version number as well. Examples are Freewheel, Google, etc.

<AdSystem version="1">Google</AdSystem> 

Ad Identifiers in VAST

Several identifiers are included in a VAST tag to determine which ad was displayed to the user. Some of the common identifiers are shown below

<AdTitle>Inline Simple Ad</AdTitle> 
  • AdServingID: As per IAB’s definition, Any ad server that returns a VAST containing an ad must generate a pseudounique identifier that is appropriate for all involved parties to track the lifecycle of that ad.
    • The use of such an ID is evident and crucial. this allows multiple tracking services to consolidate and normalize their data and provide a holistic view.
    • If multiple ads exist in an AdPod, they need to have different AdServingIDs.
  • AdTitle: the ad server must provide a title for the ad using the AdTitle element. If a longer description is needed, the description element can be used.
  • Advertiser: the name of the advertisers can be included in the VAST, which can be used to prevent displaying the ad along with its competition. As you can see, the VAST does not describe what is to be done with this field – the interpretation and usage are left to the ad servers and publishers.

Media Delivery in VAST

An ad can be transcoded to several bitrate-resolution combinations so the player can choose the right bitrate to download based on the bandwidth conditions on the player side.  This can be signaled in the VAST template as follows –

     <MediaFile id="5241" delivery="progressive" type="video/mp4" bitrate="2000" width="1280" height="720" minBitrate="1500" maxBitrate="2500" scalable="1" maintainAspectRatio="1" codec="H.264">
     <MediaFile id="5244" delivery="progressive" type="video/mp4" bitrate="1000" width="854" height="480" minBitrate="700" maxBitrate="1500" scalable="1" maintainAspectRatio="1" codec="H.264">
     <MediaFile id="5246" delivery="progressive" type="video/mp4" bitrate="600" width="640" height="360" minBitrate="500" maxBitrate="700" scalable="1" maintainAspectRatio="1" codec="H.264">

If you look closely, you’ll see that the Duration is signaled first as 16 seconds which tells the player how long the ad is. Then you have the MediaFiles element which has one or more MediaFile elements under it. Each of them describes the video to the player. For example, the second MediaFile informs that the video

  • is in mp4 container format,
  • has a height = 480 pixels and a width = 854 pixels,
  • the bitrate varies from 700 to 1500 kbps,
  • uses H.264/AVC video codec, and
  • is available at https://iab-publicfiles.s3.amazonaws.com/vast/VAST-4.0-Short-Intro-mid-resolution.mp4

This provides the necessary information to the player to choose the right bitrate by looking at the bandwidth conditions, loading the correct codec to decode the ad, and ensuring that the video is appropriately scaled to the right display resolution before being rendered to the screen.

Ad Tracking in VAST

VAST templates also contain information about ad tracking. As we all know, data is the new oil, and advertisers and publishers alike want to know if the ad has played successfully, how long it played and did it play completely.

TrackingEvents in VAST tags help in precisely this.

You can use TrackingEvents to define when an event should be generated and where it should be reported.

  1. To indicate when a tracking event should be generated, you can use predefined positions (quartiles) or define your own using progress events.
  2. To report tracking information, you can define a public-facing URI in the TrackingEvent that the player or Ad tracking SDK should trigger when a particular tracking position in the ad is reached.
Related:  AVC vs. HEVC: Detailed Results Showing 50% Gains For Varying Content  

Here is an example of an TrackingEvents snippet in a VAST tag.

    Tracking event="start"   ><![CDATA[https://example.com/tracking/start]]></Tracking>     
    <Tracking event="progress" offset="00:00:10"><![CDATA[http://example.com/tracking/progress-10]]></Tracking>     
    <Tracking event="firstQuartile"><![CDATA[https://example.com/tracking/firstQuartile]]></Tracking>     
    <Tracking event="midpoint"><![CDATA[https://example.com/tracking/midpoint]]></Tracking>
    <Tracking event="thirdQuartile"><![CDATA[https://example.com/tracking/thirdQuartile]]></Tracking>     
    <Tracking event="complete"><![CDATA[https://example.com/tracking/complete]]></Tracking>     

The various tracking points are –

  1. loaded: indicates that the video player considers that the ad has been loaded and buffered and is ready to being playback.
  2. start: ad playback has started
  3. firstQuartile: the ad has played continuously for at least 25% of the total duration at normal speed.
  4. midpoint: the ad has played continuously for at least 50% of the total duration at normal speed.
  5. thirdQuartile: the ad has played continuously for at least 75% of the total duration at normal speed.
  6. complete: the ad has played continuously to the end (100% of the duration) at normal speed.
  7. progress: this event is used to indicate that the ad has played continuously at normal speed to the point that is equal to or greater than the offset value indicated. The progress field can be used in addition to the different quartile values to get a finer understanding of ad playback. And, there can be multiple progress fields to help with this.

VideoClicks in VAST

The VideoClicks element provides the tools for advertisers to interact with users who click on ads. With this element,

  • you can redirect a user to a different URI upon clicking,
  • you can track the click event, and alternatively,
  • you can define a different action as well (other than re-direction).

Here is an example of the VideoClicks element in a VAST tag.

   <ClickThrough id="blog">

Above is an example of the VideoClicks element in VAST. It contains the

  1. ClickThrough element that can be used to define the URI to which a user is directed if they click the ad.
  2. ClickTracking element that is used to trigger a URI and raise an event in case the user clicks on the ad.
  3. CustomClick element is used to track a click that does not take the user away from the media player (i.e., triggering the ClickThrough event).

Pricing Details in VAST

This element is used to provide a value that can be used by realtime bidding systems. It contains two fields –

  1. model: this identifies the pricing model being used — CPM, CPC, CPE, or CPV.
  2. currency: a three-letter ISO-4217 currency symbol that identifies the currency of the alue provided (e.g. USD, GBP, etc.).

Here is an example –

 <Pricing model="cpm" currency="USD">
     <![CDATA[ 25.00 ]]>

VAST Errors and Error Codes

Ad delivery errors often occur and it is critical to understand the type of error so that the engineering teams can diagnose what caused the error and then fix it.

Using the Error element, the media player can provide feedback to ad servers when an Ad cannot be served. There are a set of Error Codes defined by the IAB and they are either fatal or non-fatal errors. The fatal errors prevent the ad from being played and these are closely monitored by teams involved in the ad-delivery process.

Several of the error codes are listed below. As you can see from the table, most fatal errors are related to not being able to find the media file at the URI in the VAST tag, the wrong codec was specified, or the VAST tag was constructed wrong and thus could not be parsed, etc.

Error CodeDescription
100XML parsing error.
101VAST schema validation error.
102VAST version of response not supported.
200Trafficking error. Media player received an Ad type that it was not expecting and/or cannot play.
201Media player expecting different linearity.
202Media player expecting different duration.
203Media player expecting different size.
204Ad category was required but not provided.
205Inline Category violates Wrapper BlockedAdCategories (refer 3.19.2).
206Ad Break shortened. Ad was not served.
300General Wrapper error.
301Timeout of VAST URI provided in Wrapper element, or of VAST URI provided in a subsequent Wrapper element. (URI was either unavailable or reached a timeout as defined by the media player.)
302Wrapper limit reached, as defined by the media player. Too many Wrapper responses have been received with no InLine response
303No VAST response after one or more Wrappers.
304InLine response returned ad unit that failed to result in ad display within defined time limit.
400General Linear error. Media player is unable to display the Linear Ad.
401File not found. Unable to find Linear/MediaFile from URI.
402Timeout of MediaFile URI.
403Couldn’t find MediaFile that is supported by this media player, based on the attributes of the MediaFile element.
405Problem displaying MediaFile. Media player found a MediaFile with supported type but couldn’t display it. MediaFile may include: unsupported codecs, different MIME type than MediaFile@type, unsupported delivery method, etc.

By reporting the exact error codes when a problem occurs, ad servers and publishers can quickly diagnose and fix ad-serving related problems.

Validating a VAST tag

Suppose you’re developing an ad server and you generate a VAST tag, wouldn’t it be great to have tools to validate the structure and syntax? IAB has developed a VAST validator that you can use to validate your VAST tag. It checks the structure and syntax of your VAST tag against the specification and supports VAST versions 2, 3, and 4.

Complete Example of a VAST Tag

Here is a full-example of a VAST tag from IAB’s repository of compliant VAST tags.

<VAST version="4.2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.iab.com/VAST">
   <Ad id="20009" >
       <AdSystem version="1">iabtechlab</AdSystem>
         <Extension type="iab-Count">
             <![CDATA[ 2 ]]>
       <Impression id="Impression-ID"><![CDATA[https://example.com/track/impression]]></Impression>
       <Pricing model="cpm" currency="USD">
         <![CDATA[ 25.00 ]]>
       <AdTitle>iabtechlab video ad</AdTitle>
       <Category authority="https://www.iabtechlab.com/categoryauthority">AD CONTENT description category</Category>
         <Creative id="5480" sequence="1" adId="2447226">
               <Tracking event="start" ><![CDATA[https://example.com/tracking/start]]></Tracking>
               <Tracking event="progress" offset="00:00:10"><![CDATA[http://example.com/tracking/progress-10]]></Tracking>
               <Tracking event="firstQuartile"><![CDATA[https://example.com/tracking/firstQuartile]]></Tracking>
               <Tracking event="midpoint"><![CDATA[https://example.com/tracking/midpoint]]></Tracking>
               <Tracking event="thirdQuartile"><![CDATA[https://example.com/tracking/thirdQuartile]]></Tracking>
               <Tracking event="complete"><![CDATA[https://example.com/tracking/complete]]></Tracking>
               <MediaFile id="5241" delivery="progressive" type="video/mp4" bitrate="2000" width="1280" height="720" minBitrate="1500" maxBitrate="2500" scalable="1" maintainAspectRatio="1" codec="H.264">
               <MediaFile id="5244" delivery="progressive" type="video/mp4" bitrate="1000" width="854" height="480" minBitrate="700" maxBitrate="1500" scalable="1" maintainAspectRatio="1" codec="H.264">
               <MediaFile id="5246" delivery="progressive" type="video/mp4" bitrate="600" width="640" height="360" minBitrate="500" maxBitrate="700" scalable="1" maintainAspectRatio="1" codec="H.264">
               <ClickThrough id="blog">
           <UniversalAdId idRegistry="Ad-ID">8465</UniversalAdId>

With the explanation in the previous sections, I hope you are able to understand how the VAST tag is structured and how it works.

That’s it for today’s tech deep-dive into VAST. In the next article, let’s look at VPAID and other ad-serving technologies.


krishna rao vijayanagar
Krishna Rao Vijayanagar

Krishna Rao Vijayanagar, Ph.D., is the Editor-in-Chief of OTTVerse, a news portal covering tech and business news in the OTT industry.

With extensive experience in video encoding, streaming, analytics, monetization, end-to-end streaming, and more, Krishna has held multiple leadership roles in R&D, Engineering, and Product at companies such as Harmonic Inc., MediaMelon, and Airtel Digital. Krishna has published numerous articles and research papers and speaks at industry events to share his insights and perspectives on the fundamentals and the future of OTT streaming.

6 thoughts on “What are VAST Tags (AVOD) and How Do They Work?”

  1. Pingback: What is VPAID (Video Player-Ad Interface Definition) - OTTVerse

  2. Pingback: CSAI vs SSAI: Client-Side vs. Server-Side Ad Insertion - OTTVerse

  3. Written in a nice, simple and structured way to help understand the concepts easily. Keep up the good work Krishna. Thank you.

  4. Pingback: What is a DSP (Demand Side Platform)? - OTTVerse

Leave a Comment

Your email address will not be published. Required fields are marked *

Enjoying this article? Subscribe to OTTVerse and receive exclusive news and information from the OTT Industry.