Video advertising under the hood: what is VAST?

What is VAST


Every day we come across advertising in one form or another: on sites - with a teaser, in blogs - with native, in VKontakte and Yandex.Music - with audio advertising, on YouTube, streaming services and in online movie theaters - with video. The latter will be discussed.

In this article I will tell you how video advertising works on the Internet, and what specifications it describes.

What is VAST?


Before we begin to describe the specification, let's estimate how, in general, can we show video ads on the site? The first thing that comes to mind is to upload the file with the advertisement somewhere on the server, and ask the owner of the site we will be advertising with, insert a video tag on the page with a link to our advertisement:

<video id="ourVideoAd" src="https://ourhosting.dev/ourVideoAd.mp4"></video>

Not bad, but how do you know how many people watched it? Did you look at all? Have they watched him to the end? How many people are interested in advertising? How do we send them to the landing?

The answer to all these questions is given by VAST - Video Ad Serving Template, a specification developed by the Interactive Advertising Bureau (IAB) and containing all the information about advertising: its physical location, format, URLs that will be triggered when various events occur, etc. d.

Remark: VAST is plain XML .

VAST in the wild
VAST, , , network , - vast vpaid. rbc.ru, VAST ad.mail.ru/vast/

What does VAST consist of?


The latest version of the specification at the moment is 4.2, but in reality, everyone, including Google, uses version 3.0 , and we will build our example on it.

So it all starts with the VAST tag with the version attribute :

 <VAST version="3.0"></VAST>

The VAST tag has child nodes Error and Ad . Error is used if the server did not return the advertisement. If there is an Error node , then VAST should not have other child nodes :

 <VAST version="3.0">
  <Error><![CDATA[http://ouradserver.com/noadhandler?error=true]]></Error>
 </VAST>

The Ad tag is the parent for InLine or Wrapper nodes .

Attributes:

- id : string identifier
- sequence : integer greater than zero. Allows you to combine advertising in the so-called Ad Pods . Why is this needed? For example, an advertising video player supports showing two creatives in a row. Or, if for some reason the creative does not show, the player can move on to the next. Or, you are aiming for Smart TV, in which the player interrupts the playback of the main content several times. In general, there is no unambiguous behavior, a lot depends on the specific player in which your VAST is displayed.

Ad Pods example:

 <VAST version="3.0">
  <Ad id="aGVscA" sequence="1">...</Ad>
  <Ad id="aGVscB" sequence="2">...</Ad>
  <Ad id="aGVscC" sequence="3">...</Ad>
  ...
  <Ad id="aGVscD" sequence="99">...</Ad>
 </VAST>

So, if the ad server did not return an error, then VAST may be with the InLine tag :

 <VAST version="3.0">
  <Ad id="aGVscA">
   <InLine>
    ...
   </InLine>
  </Ad>
 </VAST>

either with a Wrapper tag :

 <VAST version="3.0">
  <Ad id="SWFt">
    <Wrapper>
      ...
    </Wrapper>
  </Ad>
 </VAST>

What is the difference between InLine and Wrapper ? The InLine tag contains everything you need to launch VAST “right now”, that is, advertising creatives, tracking URLs and so on. Wrapper - contains a link to another VAST. If at this point it seemed to you that it smelled of recursion, then it did not seem to you. A little later I’ll tell you in more detail why you need to use Wrapper , and now let's look at the structure of the InLine tag .

Inline


Mandatory nodes:

  • AdSystem : name of the ad system that provided VAST
  • AdTitle: VAST'a
  • Impression: , , impression
  • Creatives: Creative

Note : the impression event occurs when the first frame of the creative is shown.

You may wonder why the AdSystem and AdTitle tags are required. Partly due to fraud. The fact is that as a creative there can be an arbitrary js-code, looking ahead I will say that such creatives are called VPAID creatives. That is, arbitrary js code that runs on millions of client machines. If one of the site owners starts complaining that the advertisement suddenly began to redirect users to questionable sites with mobile subscriptions, the presence of these tags will facilitate the search for the culprit.

So, VAST with the InLine node :

 <VAST version="3.0">
  <Ad id="aGVscA">
   <InLine>
    <AdSystem>Our AdSystem</AdSystem>
    <AdTitle>Our video ad</AdTitle>
    <AdServingId>a532d16d-4d7f-4440-bd29-2ec05553fc80</AdServingId>
    <Impression><![CDATA[https://adserver.com/track/impression]]></Impression>
    <Creatives>
        ...
    </Creatives>
   </InLine>
  </Ad>
 </VAST>

As I said above, the Creatives tag is a container for Creative tags that have attributes:

  • id : id of the ad server provided by VAST
  • sequence : serial number showing how to reproduce the creative in a row. Not to be confused with the sequence attribute in the Ad tag .
  • apiFramework : API Framework, according to the openRTB protocol

The Creatives element may contain Linear , NonLinearAds, or CompanionAds nodes .

What are Linear, NonLinearAds and CompanionAds creatives?
Linear – . , , , , pre-roll, , mid-roll post-roll . 99% . NonLinearAds — , . - , YouTube? , NonLinearAds. CompanionAds — - .

Since 99% of online advertising is Linear creatives, then we will consider only them.

Linear - has the required attribute skipoffset - after how much time you can skip the creative, in the format hh: mm: ss .

Mandatory Linear nodes :

  • Duration - the duration of the creative, in the format hh: mm: ss: mmm . Milliseconds are optional.
  • MediaFiles - contains MediaFile nodes , at least one.

Noda MediaFile - contains information about the media file to be played. It has the following attributes:

  • id : id of creative
  • delivery: progressive , , HTTP, streaming
  • type: MIME type . , video/mp4, video/webm, etc.
  • bitrate, minBitrate maxBitrate: .
  • width:
  • height:
  • scalable: , , .
  • mantainAspectRation , , , .
  • codec: , RFC 4281
  • apiFramework : API Framework, according to the openRTB protocol

The delivery , type , width, and height attributes are required, the rest are not. For files that do not have a width and height, for example, if it is an audio file, you can specify zero as the width and height values .

It turns out like this:

 <VAST version="3.0">
  <Ad id="aGVscA">
   <InLine>
    <AdSystem>Our AdSystem</AdSystem>
    <AdTitle>Our video ad</AdTitle>
    <AdServingId>a532d16d-4d7f-4440-bd29-2ec05553fc80</AdServingId>
    <Impression><![CDATA[https://adserver.com/track/impression]]></Impression>
     <Creatives>
      <Creative>
       <Linear skipoffset="00:00:05">
        <Duration>00:00:20</Duration>
         <MediaFiles>
          <MediaFile
           delivery="progressive"
           type="video/mp4"
           width="672"
           height="480">
            <![CDATA[{mediafile url}]]>
           </MediaFile>
           </MediaFiles>
       </Linear>
      </Creative>
     </Creatives>
   </InLine>
  </Ad>
 </VAST>

Well, now we have compiled a valid VAST into which you can substitute your values ​​and even now run them in ad networks. But, unfortunately, it lacks links for statistics and landing pages. Let's fix this, and consider two optional specifications nodes - TrackingEvents and VideoClicks .

TrackingEvents - in fact, it lists the urls that the player must pull during various events. The urls are in the Tracking tag with the event attribute , the value of which is a string with the name of the event. For example, the start event would look like this:

 <Tracking type="start"><![CDATA[https://adserver.com/track/start]]></Tracking>

List of main events:

  • start : creative loaded and started playing
  • creativeView: , , , . creativeView , , , , .
  • firstQuartile: 25%
  • midpoint: 50%
  • thirdQuartile: 75%
  • complete:
  • mute:
  • unmute:
  • pause:
  • rewind: -
  • resume:
  • fullscreen:
  • exitFullscreen: fullscreen
  • expand: «expand»
  • collapse: «collapse»
  • skip: ( )

In real life, support for certain events lies with the player. For example, it may not support fullscreen , or skip events . The player may also not have a playback control panel, i.e., it may not have buttons like expand , collapse , rewind , etc. Critical events are start , creativeView , firstQuartile , midpoint , thirdQuartile , complete .

Let's add to our VAST TrackingEvents :

 <VAST version="3.0">
  <Ad id="aGVscA">
   <InLine>
     <AdSystem>Our AdSystem</AdSystem>
     <AdTitle>Our video ad</AdTitle>
     <AdServingId>a532d16d-4d7f-4440-bd29-2ec05553fc80</AdServingId>
     <Impression><![CDATA[https://adserver.com/track/impression]]></Impression>
     <TrackingEvents>
      <Tracking type="start"><![CDATA[{your url}]]></Tracking>
      <Tracking type="creativeView"><![CDATA[{your url}]]></Tracking>
      <Tracking type="firstQuartile"><![CDATA[{your url}]]></Tracking>
      <Tracking type="midpoint"><![CDATA[{your url}]]></Tracking>
      <Tracking type="thirdQuartile"><![CDATA[{your url}]]></Tracking>
      <Tracking type="complete"><![CDATA[{your url}]]></Tracking>
      <Tracking type="skip"><![CDATA[{your url}]]></Tracking>
      <Tracking type="close"><![CDATA[{your url}]]></Tracking>
     </TrackingEvents>
     <Creatives>
       <Creative>
        <Linear skipoffset="00:00:05">
         <Duration>00:00:20</Duration>
         <MediaFiles>
          <MediaFile
            delivery="progressive"
            type="video/mp4"
            width="672"
            height="480">
             <![CDATA[{mediafile url}]]>
          </MediaFile>
         </MediaFiles>
        </Linear>
       </Creative>
     </Creatives>
   </InLine>
  </Ad>
 </VAST>

The VideoClicks tag can contain three nodes:

  • ClickThrough : URL to which the player should send the user when they click on the creative. Roughly speaking, a link to the landing page, with all sorts of get- parameters.
  • ClickTracking : url that tracks the fact of clickthrough itself, i.e., click on a creative or an explicit link
  • CustomClick : url that tracks all sorts of other clicks (non-clickthrough)

In 90% of the past, the first two tags are used.

As a result, we got such an InLine VAST:

 <VAST version="3.0">
  <Ad id="aGVscA">
   <InLine>
     <AdSystem>Our AdSystem</AdSystem>
     <AdTitle>Our video ad</AdTitle>
     <AdServingId>a532d16d-4d7f-4440-bd29-2ec05553fc80</AdServingId>
     <Impression><![CDATA[https://adserver.com/track/impression]]></Impression>
     <TrackingEvents>
      <Tracking type="start"><![CDATA[{your url}]]></Tracking>
      <Tracking type="creativeView"><![CDATA[{your url}]]></Tracking>
      <Tracking type="firstQuartile"><![CDATA[{your url}]]></Tracking>
      <Tracking type="midpoint"><![CDATA[{your url}]]></Tracking>
      <Tracking type="thirdQuartile"><![CDATA[{your url}]]></Tracking>
      <Tracking type="complete"><![CDATA[{your url}]]></Tracking>
      <Tracking type="skip"><![CDATA[{your url}]]></Tracking>
      <Tracking type="close"><![CDATA[{your url}]]></Tracking>
     </TrackingEvents>
     <VideoClicks>
      <ClickThrough><![CDATA[{your landing}]]></ClickThrough>
      <ClickTracking><![CDATA[{your url}]]></ClickTracking>
     </VideoClicks>
     <Creatives>
       <Creative>
        <Linear skipoffset="00:00:05">
         <Duration>00:00:20</Duration>
         <MediaFiles>
          <MediaFile
            delivery="progressive"
            type="video/mp4"
            width="672"
            height="480">
             <![CDATA[{mediafile url}]]>
          </MediaFile>
         </MediaFiles>
        </Linear>
       </Creative>
     </Creatives>
   </InLine>
  </Ad>
 </VAST>

Wrapper


As I wrote above, if you see the Wrapper tag in the past, this means that this VAST contains a link to another VAST. And that, in turn, may also contain a link to another VAST. And that, in turn ..., well, you understand .

Why do I need a Wrapper tag ? It is used, for example, when one ad network sells traffic to another ad network, which, in turn, also sells traffic to another ad network and your VAST surf the Internet until there is a relevant user who will be shown your creative. But at each stage, all participants in this scheme insert tracking pixels to keep their statistics.

A small illustrative example
. — « ». , « », , . , « », .

. , , . . , .

– , – . , ? JS c , , : , , . , , , - ? , « », , VAST InLine, . , « ».

, :

  1. .
  2. — , .
  3. .
  4. , .

, , , , , , 500 , ?

, , , « ». VAST , VAST Wrapper, - VAST .

Remark: the specification does not recommend using more than five levels of nesting, but, as I wrote, each player can behave differently.

So, Wrapper must contain the AdSystem , VASTAdTagURI and Impression nodes . We already talked about AdSystem and Impression , and the VASTAdTagURI tag contains a link to the following VAST:

VAST with the Wrapper tag :

 <VAST version="3.0">
  <Ad id="SWFt">
    <Wrapper>
     <AdSystem>Our AdSystem</AdSystem>
     <Impression><![CDATA[https://adserver.com/track/impression]]></Impression>
     <VASTAdTagURI><![CDATA[https://adserver.com/anotherVAST.xml]]></VASTAdTagURI>
    </Wrapper>
  </Ad>
 </VAST>

Remark : VAST can contain either an InLine tag or a Wrapper tag, but not both tags at once.

Conclusion


In this article, we have built VAST step by step and examined the main tags that it contains. You can substitute your urls and check its validity, for example, in Video Suite Inspector from Google.

Useful links:


All Articles