Direct Sold VAST

Adding VAST XML to the MoPub UI

To run VAST XML creatives on Guaranteed, Promotional or Backfill Line Items targeted to Phone or Tablet Fullscreen ad units, follow these steps:

  1. Create a new Guaranteed, Promotional or Backfill Line Item.
  2. Target the line item to Phone or Tablet Interstitial ad units.
  3. You will be taken to the Line Item Details page. Click on ‘Add a New Creative’.
  4. From the Format drop-down, select Phone Full Screen or Tablet Full Screen. You will see the VAST Video Radio button. If you select any other option, you will not see the VAST Video radio button option.
  5. Check the Landscape box (if applicable) and fill in the creative name.
  6. You will see a field called “VAST XML.” Paste in valid VAST XML. If you paste in invalid VAST XML or a VAST link, you will see an error message. Once you’re done, click ‘Save’ at the bottom right.

Adding a VAST Tag URI to the MoPub UI

  1. If you are looking to schedule a VAST tag instead of a VAST XML, you will need to use a VAST wrapper template and include the URI link in VASTAdTagURI element.

  2. The VAST Spec requires a value for the element and adding a placeholder 1×1 in this placeholder checks off that requirement. This pixel will not generate any tracking; leave this URL as is and do not modify: http://d30x8mtr3hjnzo.cloudfront.net/client/images/vastimp1x1.png

Example VAST wrapper

<VAST version="2.0">
  <Ad id="1">
    <Wrapper>
      <AdSystem>MoPub</AdSystem>
      <VASTAdTagURI>
        <![CDATA[ /vast_wrapper_example.xml ]]></VASTAdTagURI>
      <Impression>
        <![CDATA[ http://d30x8mtr3hjnzo.cloudfront.net/client/images/vastimp1x1.png ]]></Impression>
    </Wrapper>
  </Ad>
</VAST>

Testing and Validating VAST

  • For guidelines on the types of VAST assets and formats of tags that the UI will validate, see the below ‘Direct VAST Supported Formats’.
  • Replace any 3rd party macros in the VAST Tag with MoPub Macros , i.e. replace [timestamp] with %%CACHEBUSTER%%.
  • For instructions on how to test VAST XML in our Sample App, go back to Self-Testing Your Creatives article.
  • Per the VAST spec, the following “not ad” respoonses are acceptable and will trigger our SDK to failover and move down the waterfall.
    • <VAST version="2.0" />
    • <VAST version="3.0" />

Direct VAST Supported Formats

Here are some guidelines on the types of VAST assets and formats of tags that the MoPub UI will validate when our publishers schedule these tags in the MoPub UI.

Aspect ratio

  • phones: 480×320 landscaped aspect ratio
  • tablets: 1024×768 landscaped aspect ratio

Length of video and skip functionality

  • 1-15 second videos are non-skippable.
  • 16-30 second videos are skippable after 5 seconds.
  • Skippable or not behavior is automatically applied to the video by our SDK depending on the video length.

Requirements for the end frame, or companion banners

  • Companion banners appear after the video completes. MoPub supports companion banners for iOS and Android. These will be supported for VAST 2.0 and VAST 3.0 tags.
  • Note: Companion type support is outlined below in ‘Companion Targeting’. Also see Overview of SDK Version 3.9 Support for Video Features Section below.
  • .png, .bmp, .jpeg, and .gif files are supported in MoPub will prioritize processing companion banners in the following order once we’ve picked the best size: Static, HTML, iframe.
  • MoPub does not use the element for HTML and iframe companion banners, and expects to place the click-through destination inside of the iframe or HTML.
  • In iOS, MoPub does not fire URLs in the events for HTML and iframe companions on iOS because of limitations in the video player. They will be fired on Android.
  • Companion banner targeting: and companion banner support exists for SDK v3.9+ only.
  • Companion banner size: Minimum size of 300×250. There is no maximum size; however, images larger than the device screen will be scaled down proportionately to fit the screen, and centered. Note that if your static companion banner image does not have the same general aspect ratio as the screen; the scaled-down image will be wrapped by a black border that extends to the screen’s edge. HTML and iframe companion banners should not exceed the screen size. If submitting multiple companion banners, our SDK will pick the one that fits the device and orientation best.
  • Custom call to action: DSPs and Server-to-Server Partners can replace the standard “Learn More” call to action with a custom one, up to 15 characters in length. To do so, DSPs should add the node to their VAST XML (2.2.4.2). This can be added to a Wrapper or standard tag. _ For support, see ‘Overview of SDK Version 3.9 Support for Video Features’ section. _

Video bitrate

There are no limitations on video bitrate, however, best practices do apply:

  • Video bitrate combined with video duration should net out to a file size less than the max video size (5MB).
  • Ideally below 512kbps or lower
  • Video: H.264, constant bitrate
  • Audio:AAC, Low-complexity profile, constant bitrate, 2 channels, 44.1K Hz sampling rate
  • Audio:AAC, Low-complexity profile, constant bitrate, 2 channels, 44.1K Hz sampling rate

Maximum file size (for both iOS & Android)

  • Recommended 2MB (maximum file size is 5MB). Videos that are closer to 2MB can have a better performance

Timeout logic

  • If the request to retrieve the video file exceeds 30 seconds, it will be considered a timeout.

Including multiple MediaFile options in a VAST tag

  • Per the IAB VAST 2.0 standard, a VAST video tag should always provide multiple MediaFile options so that the client-side video player can select the MediaFile best-suited for the intended video-player. (ie: phone vs. tablet, portrait vs. landscaped, high vs. low quality/bitrate)
  • A VAST tag should always contain MediaFiles of various bitrates and formats.

Supported Formats

  • Linear Video (note that these definitions refer to the actual elements in the mobile in-app VAST tags)
  • Auto-play video
  • FPS >=24FPS
  • Companion Banners – StaticResource
  • VAST tag wrappers (VAST Tags from secondary ad server)

Not Supported Formats

  • Non-Linear Video (note that these definitions refer to the actual elements in the mobile in-app VAST tags)
  • VPAID
  • FPS <24FPS
  • Pre-roll video
  • Video inline (i.e. banners)
  • Overlay Ads
  • Simultaneous playback of video with companion banners
  • Companion Banners – HTMLResource or IFrameResource
  • Third-party macros (i.e. NOT MoPub macros) should not be included in the VAST wrapper URI

Supported Media Types

  • iOS:
    • video/mp4
    • video/3gpp
    • video/3gpp2
    • video/quicktime
    • video/x-m4v
  • Android:
    • Flash (flv, swf) is not supported
    • video/mp4
    • video/3gpp

Flash (flv, swf) is not supported on either iOS or Android – including Flash media types can cause your VAST tag to break and not work.

Last updated October 10, 2018

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2018 MoPub Inc.