Mobile App JavaScript (JS) Tag integration can be applied if you wish to serve ads through MoPub SDK.

The Mobile App JS Tag integration through the MoPub mediation platform supports:

  • mceclip34.png Interstitial (320×480)  – Video and Display ad formats
  • mceclip31.png Infeed (300×250) – Video and Display ad formats
  • mceclip32.png Medium Rectangle (300×250) – Display ad format
  • mceclip30.png Banner (320×50) – Display ad format

Setting up in-app JS Tag integration on Platform:

1. Log in to your account.

2. Go to Inventory section:


3. Create an App with integration JS tag:


4. Create Placements:

  • mceclip34.png  Interstitial (320×480) – Video and Display ad formats
  • mceclip31.png  Infeed (300×250) – Video / Display ad formats
  • mceclip32.png  Medium Rectangle (300×250) – Display ad format
  • mceclip30.png  Banner (320×50) – Display ad format


Setting up Mobile App JS tag in your MoPub account:

1. Create a New Order

  • Click on the ‘Orders’ tab in the header.
  • Click the ‘Create Order’ button.


  • Enter a descriptive name for the order and set the Advertiser to “”.


2. Create a new Item line

  • Define ‘Type’ as Non-guaranteed


  • Define ‘Advanced Targeting’: Configure the ‘Frequency Caps’ section with approved daily impression per user cap.
  • Choose ‘Start immediately’ if you want to start ad serving right after the settings are saved.



  • Define ‘Ad Unit Targeting’:
    • Choose ‘Full Screen (320×480)’ for Interstitial Ad Unit
    • Choose ‘Medium Rectangle (300×250)’ for Infeed or Medium Rectangle Ad Unit
    • Choose ‘Banner’ for Banner Ad Unit



3. Create a New Creative

Add a new creative: configure the required fields:

  • ‘Format‘:
    – Choose ‘Full Screen’ for Interstitial Ad Unit
    – Choose ‘Medium Rectangle’ for Infeed or Medium Rectangle Ad Unit
    – Choose ‘Banner’ for Banner Ad Unit
  • ‘Creative Type’ – HTML
  • ‘Orientation’  (for Full Screen (Interstitial) only) –  Responsive
  • ‘Creative dimension’:
    – Choose ‘250×300′  for ‘Medium Rectangle
    – Choose ‘50×320′  for ‘Banner
  • ‘MRAID ad’ – yes
  • ‘Impression tracking URL‘ – leave empty
  • ‘HTML‘ – insert Mobile App JS Tag (below)


Mobile App JS Tag to be inserted into Creative’s HTML field:

<script type="text/javascript">
var dioParams = {
   url: '',
   data: {
       appId: 'YOUR_APP_ID',
       placementId: 'YOUR_PLACEMENT_ID',
   macros: {
       lat: '%%LATITUDE%%',
       lon: '%%LONGITUDE%%',
       deviceId: '%eudid!',
       bundleId: '%%BUNDLE%%',
       requestId: '%%REQUESTID%%',
       userAgent: '%%USERAGENT%%',
       doNotTrack: '%%DNT%%',
       keywords: '%%KEYWORDS%%',
<img id="initjstag-beacon" style="display:none;" src=""/>
<script type="text/javascript" src=""></script>

In order to be GDPR compliant in case of European Economic Area, United Kingdom, or Switzerland geo targeting the following parameters that contain personal data should be excluded from Mobile App JS tag:

  • lat: ‘%%LATITUDE%%’,
  • lon: ‘%%LONGITUDE%%’,
  • deviceId: ‘%eudid!’,
  • keywords: ‘%%KEYWORDS%%’,

Please find your application ID and placement ID in Publisher Portal account (or ask your Account Manager), replace them in the code above and paste in the MoPub creative page into the HTML Body input.

Still have Questions?

Contact Us