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

MoPub mobile app integration via VAST XML

Last updated on October 27, 2016

Video in 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 unitIn OpenX, the 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">
    <Wrapper>
      <AdSystem version="1.0">OpenX Enterprise</AdSystem>
      <VASTAdTagURI>
        <![CDATA[http://your-instance.openx.net/v/1.0/av?auid=123456789&dr=1&did.ia=%eudid!&did.iat=true&app.name=My%20Example%20App&app.bundle=com.exampletechnologies.MyExampleAppbanner&lat=%%LATITUDE%%&lon=%%LONGITUDE%%&url=https%3A//appstore.com/us/app/my-example-app/id987654321&openrtb=%7B%22app%22%3A%7B%22bundle%22%3A%22com.exampletechnologies.MyExampleAppbanner%22%2C%22name%22%3A%22My%20Example%20App%22%2C%22storeurl%22%3A%22https%3A//appstore.com/us/app/my-example-app/id987654321%22%7D%2C%22publisher%22%3A%7B%22name%22%3A%22Test%20QA%20Publisher%22%7D%7D]]>
      </VASTAdTagURI>
    </Wrapper>
  </Ad>
</VAST>

Definitions

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 OpenX 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