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) have to pay before you can watch anything.

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

In today’s tech deep-dive, let’s take a 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. Having 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 essentially an XML Schema that contains details on where to download the ad’s media, identifiers, the length, format, duration, tracking information, pricing, etc.

In this article, we take a look at how VAST works, and some of the important metadata that is usually present in a VAST tag. Let’s take a 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: here the client (media player) requests ads from an ad server and displays it 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 take a 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 know precisely which ad was displayed to the user. Some of the common identifiers are shown below

<Advertiser>SomeColaCompany</Advertiser>
<AdServingId>a532d16d-4d7f-4440-bd29-2ec05553fc80</AdServingId>
<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 there are multiple ads in an AdPod, then 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 and this 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 is left to the ad servers and publishers.

Media Delivery in VAST

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

 <Duration>00:00:16</Duration>
   <MediaFiles>
     <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">
       <![CDATA[https://iab-publicfiles.s3.amazonaws.com/vast/VAST-4.0-Short-Intro.mp4]]>
     </MediaFile>
     <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">
       <![CDATA[https://iab-publicfiles.s3.amazonaws.com/vast/VAST-4.0-Short-Intro-mid-resolution.mp4]]>
     </MediaFile>
     <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">
       <![CDATA[https://iab-publicfiles.s3.amazonaws.com/vast/VAST-4.0-Short-Intro-low-resolution.mp4]]>
     </MediaFile>
   </MediaFiles>    

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 looking at the bandwidth conditions, load the correct codec to decode the ad, and ensure 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 did it play, 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:  Sustainable Subscriptions - Revenue Success and Churn Prevention in a Pandemic

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

<TrackingEvents>     
    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>     
 </TrackingEvents>   

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 a 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.

<VideoClicks>
   <ClickTracking>
      <![CDATA[http://myTrackingURL/clickTracking]]>
   </ClickTracking>
   <ClickThrough id="blog">
      <![CDATA[https://iabtechlab.com]]>
   </ClickThrough>
</VideoClicks> 

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 ]]>
 </Pricing> 

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 of the fatal errors are related to not being able to find the media file at the URI in the VAST tag, or the wrong codec was specified, or the VAST tag was constructed wrong and thus could not be parsed, 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" >
     <InLine>
       <AdSystem version="1">iabtechlab</AdSystem>
       <Error><![CDATA[https://example.com/error]]></Error>
       <Extensions>
         <Extension type="iab-Count">
           <total_available>
             <![CDATA[ 2 ]]>
           </total_available>
         </Extension>
       </Extensions>
       <Impression id="Impression-ID"><![CDATA[https://example.com/track/impression]]></Impression>
       <Pricing model="cpm" currency="USD">
         <![CDATA[ 25.00 ]]>
       </Pricing>
       <AdServingId>a532d16d-4d7f-4440-bd29-2ec0e693fc89</AdServingId>
       <AdTitle>iabtechlab video ad</AdTitle>
       <Category authority="https://www.iabtechlab.com/categoryauthority">AD CONTENT description category</Category>
       <Creatives>
         <Creative id="5480" sequence="1" adId="2447226">
           <Linear>
             <TrackingEvents>
               <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>
             </TrackingEvents>
             <Duration>00:00:16</Duration>
             <MediaFiles>
               <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">
                 <![CDATA[https://iab-publicfiles.s3.amazonaws.com/vast/VAST-4.0-Short-Intro.mp4]]>
               </MediaFile>
               <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">
                 <![CDATA[https://iab-publicfiles.s3.amazonaws.com/vast/VAST-4.0-Short-Intro-mid-resolution.mp4]]>
               </MediaFile>
               <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">
                 <![CDATA[https://iab-publicfiles.s3.amazonaws.com/vast/VAST-4.0-Short-Intro-low-resolution.mp4]]>
               </MediaFile>
             </MediaFiles>
             <VideoClicks>
               <ClickTracking>
                 <![CDATA[http://myTrackingURL/clickTracking]]>
               </ClickTracking>
               <ClickThrough id="blog">
                 <![CDATA[https://iabtechlab.com]]>
               </ClickThrough>
             </VideoClicks>
           </Linear>
           <UniversalAdId idRegistry="Ad-ID">8465</UniversalAdId>
         </Creative>
       </Creatives>
     </InLine>
   </Ad>
 </VAST> 

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 take a look at VPAID and other ad-serving technologies.


References

krishna rao vijayanagar
Krishna Rao Vijayanagar

I’m Dr. Krishna Rao Vijayanagar, and I have worked on Video Compression (AVC, HEVC, MultiView Plus Depth), ABR streaming, and Video Analytics (QoE, Content & Audience, and Ad) for several years.

I hope to use my experience and love for video streaming to bring you information and insights into the OTT universe.

1 Comment

2 Trackbacks / Pingbacks

  1. What is VPAID (Video Player-Ad Interface Definition) - OTTVerse
  2. CSAI vs SSAI: Client-Side vs. Server-Side Ad Insertion - OTTVerse

Leave a Reply

Your email address will not be published.


*