You are here: Publishers > Inventory > Ad tags > MoPub integration via VAST XML

MoPub mobile app integration via VAST XML

Last updated on May 30, 2017

Video in the OpenX Ad Exchange is in Beta release only. Please contact your Account Manager to have this feature enabled.

If you are using the OpenX Ad Exchange and MoPub as your ad serverA complete digital advertising platform where publishers sell, manage, and deliver their advertising inventory across all digital formats., you can create OpenX VAST XML ad tags to integrate with MoPub and pass various parameters from custom apps on Android and iOS devices.

The tag you generate by creating a mobile app linear video ad unit in the OpenX UI comes with some MoPub macrosFor OpenX, a command enclosed in curly braces {} that dynamically inserts attributes into your HTML or third-party ad creatives and click-through URLs when OpenX serves an ad. Other macros, like from your video player, may have alternate formatting. already appended. You can include additional MoPub macros in OpenX ad tags to automatically capture other user-specific parameters. However, if you want to define additional inventoryAd space available on a website or app. The basic unit of inventory for OpenX is an ad unit.-specific parameters, you must do so manually with URL encoded values. See the openrtb parameter in the sample code below for an example of URL encoded values.

Sample VAST XML ad tag with MoPub macros

The following tag is an example of what you generate by creating a mobile appSynonymous with mobile. Refers to the use of an app via a mobile device, specifically to differentiate from mobile web. linear videoAn ad or ad unit that displays in sequence with video content in a video player. Sequencing may be pre-roll, mid-roll, or post-roll. Can be accompanied by a companion ad. An example is a video ad that plays before a video starts, though static images may also serve. ad unitThe smallest inventory component that represents the space on a site where ads display. in the OpenX UI and choose MoPub as your ad server. It is color-coded as follows:

<?xml version="1.0" encoding="UTF-8"?>
<VAST version="2.0">
  <Ad id="1611087617">
      <AdSystem version="1.0">OpenX Enterprise</AdSystem>


The following parameters are all included in the MoPub VAST XMLA structured video ad response comprised of XML. tag you generate, depending on whether the ad unit's platform is Android or iOS:

For additional information, see:

Next steps

Once you have constructed the tag based on your needs, you can paste it into the VAST XML field of the MoPub UI, which is in the following location:

Orders > Line ItemThe primary unit of execution for an order, which represents a specific inventory purchase and the required conditions for ad delivery. > Creatives >Add/Edit CreativeThe media asset associated with an ad, such as an image or video file.

This topic applies to Ad Exchange.

Feedback form