Interstitial Ads

Interstitial Ads are full screen ads that display over any of your application’s content. These ads often result in higher eCPM for developers. The best time to use Interstitial Ads is during a natural break in the application’s content, such as after completion of a level in a game.

Within interstitial ad placements developers have the option to display interactive video ads. These units often produce the highest eCPM. To ensure a placement is able to recieve these ads, check mMedia or speak to a Millennial Media Account Manager.

Basic Integration

NOTE: Items in source like <YOUR_PLACEMENT_ID> must be replaced with your information.

1. Add the following to your view controller’s header (.h) file.
#import <UIKit/UIKit.h>
#import <MMAdSDK/MMAdSDK.h>

@interface ViewController : UIViewController <MMInterstitialDelegate>

@property (strong, nonatomic) MMInterstitialAd *interstitialAd;

@end
2. Add the following to your view controller’s .m file to fetch and display an interstitial ad.

If you plan to display multiple interstitials within your app, you will want to fetch an ad in other places within your app too. For games, a good time to fetch an interstitial ad is while the user is actively playing a level. Remember to replace <YOUR_PLACEMENT_ID> with an Interstitial placement ID. Interstitial placement IDs can be created in mMedia or provided by an Account Manager.

- (void)viewDidLoad {
    self.interstitialAd = [[MMInterstitialAd alloc] initWithPlacementId:@"<YOUR_PLACEMENT_ID>"];
    self.interstitialAd.delegate = self;
    [self.interstitialAd load:nil];
}

- (void)showInterstitialAd {
    if (self.interstitialAd.ready) {
        [self.interstitialAd showFromViewController:self];
    }
}

- (void)dealloc {
   _interstitialAd.delegate = nil;
   _interstitialAd = nil;
}

Best Practice: Interstitial ads are cached to the user’s device in order to provide the best possible experience. It is recommended that publishers request interstitial ads at least 10-30 seconds before they are ready to be displayed. This helps ensure that the ad is fully cached and ready to display.