Building Blocks for VAST XML Code

Product
Video Cloud
Applies to Roles
Ad Operations
Version
Brightcove 5
Edition
Pro, Enterprise

This topic describes the building blocks used to build the VAST 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 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.

Impression URL (Impression tag)

The Impression URLs are the URLs that are called when the ad begins displaying and result in the publisher being paid. You may add more than one Impression URL. Impression URLS are 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 not trigger any calls to any <Tracking> URLs. Banners only trigger calls to <Impression> URLs.  All ads should define one or more <URL> tags 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>
    <URL id="someAdvertiserName">
        <![CDATA[http://adserver.example.com/impression?parameters=adparameter1;adparameter2]]">
    </URL>
</Impression>	

Tracking Events (Tracking tag)

The following tracking events can be declared in the <TrackingEvents> tag that will cause tracking requests when any of the following events happen:

  • Ad Start. Fired when the video or overlay begins moving (shortly after the impression).
  • Ad Mid Point. Fired at the middle of the video or overlay duration.
  • Ad Complete. Fired at the end of the video or overlay.
  • Ad Pause. Fired when the video ad is paused.
  • Ad Resume. Fired when a video ad has been previously paused and resumes playback.
  • Ad Mute. Fired when a video ad is muted.
  • Ad Unmute. Fired when a video ad is unmuted.
<TrackingEvents>
    <Tracking event="start">
        <URL id="yourAdvertiser">
            <![CDATA[http://ads.example.com/tracking?;trackPoint=trackstart;frmt=0;duration=13]]>
        </URL>
    </Tracking>
    <Tracking event="midpoint">
        <URL id="yourAdvertiser">
            <![CDATA[http://ads.example.com/tracking?;trackPoint=mid;frmt=0;duration=13;]]>
        </URL>
    </Tracking>
    <Tracking event="complete">
        <URL id="yourAdvertiser">
            <![CDATA[http://ads.example.com/tracking?;trackPoint=end;frmt=0;duration=13]]>
        </URL>
    </Tracking>
    <Tracking event="pause">
        <URL id="yourAdvertiser">
            <![CDATAhttp://ads.example.com/tracking?;trackPoint=pause;frmt=0;duration=13;]>
        </URL>
    </Tracking>
    <Tracking event="resume">
        <URL id="yourAdvertiser">
            <![CDATAhttp://ads.example.com/tracking?;trackPoint=resume;frmt=0;duration=13;]>
        </URL>
    </Tracking>
    <Tracking event="mute">
        <URL id="yourAdvertiser">
            <![CDATAhttp://ads.example.com/tracking?;trackPoint=mute;frmt=0;duration=13;]>
        </URL>
    </Tracking>
    <Tracking event="unmute">
        <URL id="yourAdvertiser">
            <![CDATAhttp://ads.example.com/tracking?;trackPoint=unmute;frmt=0;duration=13;]>
        </URL>
    </Tracking>
</TrackingEvents>

Video Ads (Video tag)

The <Video> tag includes a video click-through URL and a video URL. This first video ad will be chosen.

<Video>
    <Duration>00:00:13</Duration>
    <AdID>BCID9001000</AdID>
    <VideoClicks>
        <ClickThrough>
            <URL id="yourAdvertiser">
                <![CDATA[http://website.example.com/?customerFrom=yourVideo]]>
</URL> </ClickThrough> </VideoClicks> <MediaFiles> <MediaFile delivery="progressive" bitrate="466" width="480" height="360" type="video/x-flv"> <URL> <![CDATA[http://creatives.example.com/videoAds/will_serve_this_advertisement.flv?]]>
</URL> </MediaFile> <MediaFile delivery="progressive" bitrate="466" width="480" height="360" type="video/x-flv"> <URL> <![CDATA[http://creatives.example.com/videoAds/will_not_serve_this_advertisement.flv?]]>
</URL> </MediaFile> </MediaFiles> </Video>

The duration is in Hours:Minutes:Seconds format.

The <AdID> tag is defined by the Ad-ID system on this website https://www.ad-id.org/

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 a URL tag within the MediaFile element and set the MediaFile element's type attribute to the correct MIME type for your image.

Overlay Ads (NonLinear tag)

Overlay ads are trafficked using the VAST <NonLinear> tag.

<NonLinearAds>
    <NonLinear id="overlay" duration="00:00:05" width="480" height="90"
        resourceType="static" scalable="true" maintainAspectRatio="true"
        creativeType="image/png">
        <URL>
            <![CDATA[http://creatives.example.com/Ads/overlay_480x90.png]]>
</URL> <NonLinearClickThrough> <URL> <![CDATA[http://advertiser.example.com?clickThrough=overlay_VAST_jpg]]>
</URL> </NonLinearClickThrough> </NonLinear> </NonLinearAds>

The duration parameter is optional and is in Hours:Minutes:Seconds format.

Banner Ads (Companion tag)

Banner ads are trafficked using the VAST <Companion> tag.  Banner ads only call <Impression> URLs. Banners do not call <Tracking> URLs.

<CompanionAds>
    <Companion id="banner" width="468" height="60" resourceType="static"
        creativeType="application/x-shockwave-flash">
        <URL>
            <![CDATA[http://ads.example.com/creatives/banner_468x60.swf]]>
</URL> <CompanionClickThrough> <URL> <![CDATA[http://advertiser.example.com?clickThrough=banner_468x60]]>
</URL> </CompanionClickThrough> </Companion> </CompanionAds>

The creativeType is the MIME type of the banner being served.

Expanding Banners (Companion Tag)

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.

<CompanionAds>
    <Companion id="banner" width="728" height="90" resourceType="static"
        creativeType="image/jpeg">
        <URL>
            <![CDATA[http://ads.example.com/banner_728x90.jpg]]>
</URL> <CompanionClickThrough> <URL> <![CDATA[http://advertiser.example.com/?clickThrough=banner728x90_VAST_jpg]]>
</URL> </CompanionClickThrough> </Companion> <Companion id="expanding_banner" width="0" height="0" expandedWidth="300" expandedHeight="250" resourceType="static" creativeType="application/x-shockwave-flash"> <URL> <![CDATA[http://ads.example.com/expanded_300x250.swf]]>
</URL> <CompanionClickThrough> <URL> <![CDATA[http://advertiser.example.com/?clickThrough=expandingBanner300x250]]>
</URL> </CompanionClickThrough> </Companion> </CompanionAds>

Ad Display SWFs (NonLinear tag)

Ad Display SWFs are trafficked using the VAST <NonLinear> Tag. The <id> must be set to adSwf in order for the Ad SWF to load correctly. Without the correct id attribute, the player will mistake the adSwf for an Overlay SWF.

<NonLinearAds>
    <NonLinear id="adSwf" width="8" height="8" resourceType="static"
        creativeType="">
        <URL>
            <![CDATA[http://admin.brightcove.com/adswf/Google.swf]]>
</URL> <AdParameters> <optionalArg>1</optionalArg> <SecondParameter>Two</SecondParameter> </AdParameters> </NonLinear> </NonLinearAds>

Note that the <AdParameters> elements are included here to show you that you can freely add child elements to the adSwf element, similar to the <optionalArg> elements in Video Cloud AdSwf XML format.

Caution: <Duration> is a reserved tag and should not be used for AdParameters.

For more information, see Developing Ad Display SWFs.

Tags
VAST