What is VAST?
The IAB's Video Ad Serving Template (VAST) specification is a universal XML schema for serving ads to digital video players. It provides support for linear pre-roll, mid-roll and post-roll MP4/FLV/WebM video ads as well as non-linear GIF/JPG/PNG, Flash (SWF), text, HTML, <IFRAME> and <SCRIPT> banners. In addition to this it also specifies video tracking events, which enables measurement of video advertising consumption.
The VAST specification supports the use of wrappers. A VAST wrapper is a VAST response that points to a VAST ad hosted by a third party ad server. It is also possible for a VAST wrapper to point to another VAST wrapper, creating a chain of VAST wrappers that finally point to a VAST ad. Each VAST wrapper that is loaded contains tracking information, which allows all ad servers involved to track impressions, clicks and other VAST supported tracking events.
We learned how to deploy CDN hosted, pre-roll video ads using JWPlayer in our previous tutorial. In this tutorial we're also going to use JWPlayer, but this time we're going to be wrapping a third-party VAST tag. The major difference here is that there is no video to upload. If you followed along with our previous tutorial you'll find this one is much shorter for that reason.
Creating a VAST Tag Wrapper
Creating the Media
You'll obviously want to set up a zone with multiple campaigns/media on your live web site, but for the purpose of this example we'll skip those extra steps.
- Log in to your AdvertServe account.
- Go to Media and create a new media. Select VAST Tag Wrapper for the media type.
Enter the following URL in the VAST Tag URL field:
- Review your settings and make sure they look like the ones in the screenshot below.
- Press the Create Media button.
Generating the VAST Tag
- After you have successfully created the media, simply click on the Generate Code shortcut that appears on the top right side of the screen.
- You'll be presented with a VAST Tag that you simply need to copy and paste into the JWPlayer settings.
Video Uploading and Player Configuration
- Go to jwplayer.com and sign up for the JW Player enterprise plan if you haven't already.
- Log in to your JW Player account.
- Click on the Publish a Video Now button and make sure your Player Edition is the Ads version as shown in the screenshot below.
- Click on the Your Website button and then you'll need to enter the streaming URL for another video that you've uploaded to RackSpace Cloud Files. I'm using a video of an animated flyby over some train tracks. I also happen to have a JPG image that I'm using for the poster image as shown in the screenshot below, however, this is completely optional.
On the next screen you'll be able to customize the video player to your liking.
- Make sure that your primary player is selected as Flash and it will automatically fall back on using HTML5 for visitors without Flash capability.
- You then need to select VAST Preroll for the Ad Client and enter the VAST Tag that you generated earlier into the provided Insert Your Ad Tag box as shown in the screenshot above.
- When everything is set how you like it press the Get Embed Code button.
Publishing Your Video
The first part of the Embed Code should be pasted into the
<head> section of your page
and will look similar to the following:
The second part of the Embed Code should be pasted into the
<body> section of your page
where the video should actually appear and will look similar to the following:
I've actually changed the width and height to 480x270 in the above code
and added the
stretching: 'fill' option to make the video stretch to
fill that entire space.
This was a great introduction to third-party video ad serving, but VAST has much more to offer. We will be publishing more blogs in this series covering mid/post-roll video ads, companion banners and non-linear banners. Again, we'll be using JWPlayer but you can also use other players such as Brightcove, Flowplayer or Projekktor to accomplish this as well, so stay tuned for more!