Interstitial Integration for Unity

Interstitial ads provide full-screen experiences, commonly incorporating rich media to offer a higher level of interactivity than banner ads. Interstitials are typically shown during natural transitions in your application, such as on app launch, after completing a game level, or while your app is downloading content from the internet.

Integration

  1. Pre-fetch an interstitial

     MoPub.requestInterstitialAd(interstitialAdUnit);
    
  2. Show the interstitial

     MoPub.showInterstitialAd (interstitialAdUnit);
    
  3. [Optional] Implement the lifecycle callbacks

The MoPub Unity plugin includes a variety of optional callbacks that you can use to be notified of events, e.g. when an interstitial has successfully loaded, or when an interstitial is closed. Here are the interstitial-related callback handlers:


void onInterstitialLoaded (string adUnitId)
void onInterstitialFailed (string adUnitId, string errorCode)
void onInterstitialDismissed (string adUnitId)
void interstitialDidExpire (string adUnitId)
void onInterstitialShown (string adUnitId)
void onInterstitialClicked (string adUnitId)

Best Practices

  • You can be notified that an interstitial was fetched successfully by implementing onInterstitialLoaded, We highly recommend to wait for the onInterstitialLoadedcallback, before showing the interstitial. This will ensure that the ad will have enough time to load and show as expected.

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.