Integrating AerServ Vast Tags in Mopub


A VAST (Video Ad Serving Template) tag is a HTTP or HTTPS URL that points to a VAST XML feed. The VAST XML URL feed contains information about the video ad, including the video file, length, companion banner and more. (you can read more about VAST in the IAB spec here:

The video player uses the VAST XML URL feed to instruct it when and what video ad to play. Without it the video player would be unable to play a video advertisement. The VAST XML URL feed is in a standardized format that all video players can understand, so if the feed does not conform to this standard then the video player will be unable to understand and play it.


Integrating a VAST Tag

In order to consume a VAST XML URL feed, it can be entered directly into an ad server, which is called via a video player or in some cases the URL can be entered directly into the video player code. The VAST XML URL will not work outside of a video player so just entering the link directly on a webpage will not work.

AerServ will provide you with a VAST XML URL which you will enter into the Mopub ad server.


Step 1: Create an App or Site

Step 2: Add aerVideo as an Ad Product & Create a PLC 

A PLC is a unique ID that is used to retrieve ads for a particular site and placement created within the AerServ platform.  Your PLC can be found within the Inventory section of the AerServ platform. Please reach out to your Account Manager with any questions regarding your PLC or for a tutorial guide go here!

  1. Click on Generate my Tag Link
  2. Copy your Live Tags
  3. To verify integration replace live tag PLC with 1000741






The VAST tag contains macros that will need to be populated by the publisher prior to sending a request to AerServ. Macros are placeholders for data values that are dependent on the user of the page.  The population of macros are crucial to campaign targeting and can have a significant impact on fill rate.  Below are examples of macros that may be included in the VAST XML URL.

Macros should be added after each key in the query string. ie ("cb=$[cb]").  

  • Macro shown above (in green) are AerServ specific, please use your 3rd party server macros
  • Description of each key is below.

If you have trouble verifying your VAST tag please contact your Account Manager for assistance.


AerServ Parameter Overview

Application Name appname Tien%Len%Online N/A Required String (encoded)
App Store URL siteurl


N/A Required String (encoded)
App Bundle ID bundleid IOS: id447031106 Android: N/A Required String (encoded)
Page URL url Required NA String (encoded)
App domain appdomain N/A required String (encoded)
Application Version appversion 1.0 N/A Optional String
CacheBuster cb 123456789 Required Required Integer
Connection Type network wifi, carrier N/A Optional String
Do Not Track dnt 1 for do not track, 0 for allow to track N/A Required Boolean
Advertising ID -
Unhashed Apple IDFA or Google AdId
adid bbd606b1-32ab-4a1e-b2aa-5771ad804430 N/A *Required String
Lat lat 33.58 N/A Optional Float
Long long 117.73 N/A Optional Float
IP Address ip 123.456.78.9 Required Required String
Device Make make Apple Required Required String
Device Model model iPhone4 Required Required String
Operating System os iOS Required Required String
Operating System Version osv 7.1 Required Required String
Device Type type phone, tablet Required Optional String
User Agent ua




Required Required String (encoded)
Cell Carrier carrier Verizon N/A Optional String


*Provide either the Device ID or the Advertising ID  

Step 3: Login to Mopub & Click on the Order Tabs


Step 4: Fill in Order Details & Select App
Step 5:  Add a New Creative
Step 6: Fill in Creative Details & Paste Vast XML into the Creative
 VAST tag integration: 






            <![CDATA[ PASTE VAST TAG HERE ]]>









MoPub Macros
MoPub supports the following macros for a publisher’s 3rd party ad tags and trackers:
  • Click URL (Unescaped):  %%CLICK_URL_UNESC%% 
  • Click URL (Escaped):  %%CLICK_URL_ESC%% 
  • Cache Buster (Generates a random number): %%CACHEBUSTER%%
  • Ad Unt ID: %%ADUNITID%%
  • Placement ID (appID for in-app, siteID for mobile-web): %%PLACEMENTID%%
  • Ad Group ID: %eaid!
  • Creative ID: %ecid!
  • Destination URL: %%DEST_URL%%
  • Destination URL (Escaped): %%DEST_URL_ESC%%
  • Destination URL (Double Escaped): %%DEST_URL_ESC_ESC%%
  • IDFA, SHA1 Hashed Android ID, or Android Advertising ID (if Google Play Services is integrated): %eudid!
  • Keywords: %%KEYWORDS%%
  • Specific Key Value: %%KEYWORD:[key]%% (replace [key] with the parameter you want to return the value for)
  • Latitude: %%LATITUDE%%
  • Longitude: %%LONGITUDE%%
  • DNT (device-level do-not-track setting, 0 or 1): %%DNT%%




Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


  • Avatar
    Bram Smith

    This example shows both a VAST wrapper and the VAST output generated by going to the vast request URL. If you do the latter, won't it request the same video each time? Also, if no video is available, is there a method used to passback to Mopub, or is that automatic when using VAST video?

  • Avatar
    Si Bui

    The VAST wrapper will allow request of multiple ads.
    The VAST output you will get the same video ads each time. If there is no video available, MOPUB ad server detect and it goes to next ad network waterfall on MOPUB.

  • Avatar
    Bram Smith

    Yes I understand that, but when I test the ad unit that uses the wrapper, it works fine with the test PLC of 1000741, but when I change it to my live PLC, I just get a black screen with the Mopub close button at the top right. No video and no passback to my backfill ads. I am using Vdopia and TapIt as my sources and have them setup properly.

  • Avatar
    Si Bui

    Hello Bram,

    I was able to render an Ad using Mopub dashboard with your PLC. I am able see several of our ads.


    Let me know if this works for you.



  • Avatar
    Bram Smith

    Yes, it's working now. For some reason it wouldn't render in the test ad unit I had setup within Mopub, maybe because it was a sample app. When I added it to the actual ad unit for the live game it rendered properly. Thanks!