This topic describes the building blocks used to build the VAST 2.0 XML code. It provides some basic background information about the XML code. The actual XML code that can be used for each ad format is provided in VAST 2.0 Ad Formats and Format Codes.
For a visual depiction of the XML elements in VAST, showing which elements Video Cloud currently supports, click here.
For a complete copy of the VAST specification, see the IAB website.
An Ad can either be of type <InLine> or of type <Wrapper>. <InLine> ads contain all the elements necessary to display the visual experience. <Wrapper> ads point to a downstream VAST document that must be requested from another server. Read more about the <Wrapper> tag.
<?xml version="1.0" encoding="UTF-8"?> <VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast2.xsd" version="2.0.0"> <Ad id="My InLine Ad"> <InLine> ...
<?xml version="1.0" encoding="UTF-8"?> <VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast2.xsd" version="2.0.0"> <Ad id="My Wrapper Ad"> <Wrapper> ...
The Impression URL is the URL that is called when the ad begins displaying; it is important because it results in the publisher being paid. The Impression URL is fired right after buffering for linear ads, and right before the creative is rendered for nonlinear ads, according to the IAB guidelines.
This value is equivalent to the trackStartURL in the Video Cloud ad formats. In VAST, the <Tracking event="start"> calls occur at approximately the same time but signify that the video, if any, or overlay, if any, is playing and should not be used for counting impressions. Banners will not trigger any calls to any <Tracking> URLs. Banners only trigger calls to <Impression> URLs. All ads should define a URL inside an <Impression> tag. It is recommended that you put the text of the URL inside a <![CDATA[]]> tag to avoid problems with special characters such as quotation marks or ampersands. A typical impression tag will look like this:
<Impression>
<![CDATA[http://adserver.example.com/impression?
parameters=adparameter1;adparameter2]]">
</Impression>
The <Linear> tag includes a video click-through URL, a video URL and appropriate tracking events. This first video ad will be chosen.
<Creatives>
<Creative AdID="BCID9001000">
<Linear>
<Duration>00:00:13</Duration>
<TrackingEvents>
...
</TrackingEvents>
<VideoClicks>
<ClickThrough>
<![CDATA[http://website.example.com]]>
</ClickThrough>
</VideoClicks>
<MediaFiles>
<MediaFile delivery="progressive" bitrate="466" width="480" height="360" type="video/x-flv">
<![CDATA[http://creatives.example.com/videoAds/will_serve_this_advertisement.flv?]]>
</MediaFile>
<MediaFiles>
</Linear>
</Creative>
</Creatives>
The <Duration> is in Hours:Minutes:Seconds format.
The AdID parameter is defined by the Ad-ID system, which is a a Web-based system for assigning unique identifiers to advertising assets. Read more about Ad-ID.
Video Cloud also supports extensions to the VAST standard to allow static images as pre-rolls. To do this, put the URL to the static image in the MediaFile element and set the MediaFile element's type attribute to the correct MIME type for your image.
Overlay ads are trafficked using the VAST <NonLinear> tag.
<Creatives>
<Creative AdID="BCID9001000">
<NonLinearAds>
<TrackingEvents>
...
</TrackingEvents>
<NonLinear id="overlay" minSuggestedDuration="00:00:05"
width="480" height="90" scalable="true" maintainAspectRatio="true">
<StaticResource creativeType="image/png">
<![CDATA[http://creatives.example.com/overlayAds/overlay_480x90.png]]>
</StaticResource>
<NonLinearClickThrough>
<![CDATA[http://website.example.com]]>
</NonLinearClickThrough>
</NonLinear>
</NonLinearAds>
</Creative>
</Creatives>
The minSuggestedDuration parameter is optional and is in Hours:Minutes:Seconds format.
The following tracking events can be declared in the <TrackingEvents> tag (within the <Creative> tag) that will cause tracking requests when any of the following events happen:
<TrackingEvents>
<Tracking event="start">
<![CDATA[http://ads.example.com/tracking?;trackPoint=start;frmt=0]]>
</Tracking>
<Tracking event="firstQuartile">
<![CDATA[http://ads.example.com/tracking?;trackPoint=firstQuartile;frmt=0]]>
</Tracking>
<Tracking event="midpoint">
<![CDATA[http://ads.example.com/tracking?;trackPoint=midpoint;frmt=0]]>
</Tracking>
<Tracking event="thirdQuartile">
<![CDATA[http://ads.example.com/tracking?;trackPoint=thirdQuartile;frmt=0]]>
</Tracking>
<Tracking event="complete">
<![CDATA[http://ads.example.com/tracking?;trackPoint=complete;frmt=0]]>
</Tracking>
<Tracking event="creativeView">
<![CDATA[http://ads.example.com/tracking?;trackPoint=creativeView;frmt=0]]>
</Tracking>
<Tracking event="mute">
<![CDATA[http://ads.example.com/tracking?;trackPoint=mute;frmt=0]]>
</Tracking>
<Tracking event="unmute">
<![CDATA[http://ads.example.com/tracking?;trackPoint=unmute;frmt=0]]>
</Tracking>
<Tracking event="pause">
<![CDATA[http://ads.example.com/tracking?;trackPoint=pause;frmt=0]]>
</Tracking>
<Tracking event="resume">
<![CDATA[http://ads.example.com/tracking?;trackPoint=resume;frmt=0]]>
</Tracking>
<Tracking event="fullscreen">
<![CDATA[http://ads.example.com/tracking?;trackPoint=fullscreen;frmt=0]]>
</Tracking>
</TrackingEvents>
Banner ads are trafficked using the VAST <Companion> tag. Banner ads only call <Impression> URLs. Banners do not call <Tracking> URLs.
<Creatives>
<Creative>
<CompanionAds>
<Companion id="banner" width="468" height="60" >
<StaticResource creativeType="image/png">
<![CDATA[http://creatives.example.com/bannerAds/banner_480x90.png]]>
</StaticResource>
<CompanionClickThrough>
<![CDATA[http://website.example.com]]>
</CompanionClickThrough>
</Companion>
</CompanionAds>
</Creative>
</Creatives>
The creativeType is the MIME type of the banner being served.
Expanding banner ads are also trafficked using the VAST <Companion> tag with different parameters. In the example below, two banners are defined: one regular banner for the collapsed form, and one expanded banner with expandedWidth and expandedHeight parameters.
<Creatives>
<Creative>
<CompanionAds>
<Companion id="banner" width="728" height="90" >
<StaticResource creativeType="image/jpeg">
<![CDATA[http://creatives.example.com/bannerAds/banner_728x90.jpg]>
</StaticResource>
<CompanionClickThrough>
<![CDATA[http://website.example.com]]>
</CompanionClickThrough>
</Companion>
<Companion id="expanding_banner" width="0" height="0" expandedWidth="300" expandedHeight="250" >
<StaticResource creativeType="application/x-shockwave-flash">
<![CDATA[http://creatives.example.com/bannerAds/expandingBanner_300x250.swf]]>
</StaticResource>
<CompanionClickThrough>
<![CDATA[http://website.example.com]]>
</CompanionClickThrough>
</Companion>
</CompanionAds>
</Creative>
</Creatives>
Ad Display SWFs and VPAID SWFs are trafficked using the VAST <NonLinear> Tag. The id parameter must be set to adSwf in order for the Ad SWF to load correctly. Setting the apiFramework parameter to Brightcove tells the Video Cloud player that this is a custom Ad Display SWF; set the apiFramework parameter to VPAID for VPAID SWFs. Without the correct id and apiFramework attributes, the player will mistake the adSwf for an Overlay SWF.
<NonLinearAds>
<NonLinear id="adSwf" height="360" width="480" apiFramework="Brightcove">
<StaticResource creativeType="application/x-shockwave-flash">
<![CDATA[http://creatives.example.com/adSWFs/exampleAdSwf.swf]]>
</StaticResource>
<NonLinearClickThrough>
<![CDATA[http://website.example.com]]>
</NonLinearClickThrough>
<AdParameters>
Duration=15;SecondParameter=keyword;
</AdParameters>
</NonLinear>
</NonLinearAds>
Note that the <AdParameters> elements are included here to show you that you can freely add additional parameters to the Ad Display SWF, similar to how the <optionalArg> elements in Video Cloud AdSwf XML format work.
For more information, see Developing Ad Display SWFs and Developing VPAID SWFs.