Interstitial Ads

We support both static and video interstitial ads. The steps for setting up static and video interstitial ads are explained in the respective sections below.

Set up a Static Interstitial Ad

  1. To display an Interstitial ad, you need an interstitial placement ID.
  2. After adding your app, select INTERSTITIAL AD to create a placement for ad type Interstitial.
  3. Once you successfully create the placement, the placement ID is available.


Set up a Video Interstitial Ad

To create a video ad, you need to start creating an interstitial ad placement (as mentioned above). Once you have created an interstitial ad placement, you have controls on the InMobi portal to either run a mix of static and video ads or video only.

  1. Go to your interstitial placement and click Ad Controls.
  2. Enable video ads by selecting the first option in the list.
  3. Click on Video ad controls for enabling advanced features like skippable ads.

Add the Interstitial Ad to your App

Creating an Interstitial Ad

The IMInterstitial is simply a UIViewController subclass displaying full screen ads that respond to user touch.

Follow these steps to create the interstitial ad unit programmatically:

  1. Import the headers and declare an interstitial instance in your ViewController.h / ViewController.swift file. Your ViewController header file should look like this:

    Objective C

    #import  <UIKit/UIKit.h> 
    @import InMobiSDK; 
    @interface ViewController : UIViewController <IMInterstitialDelegate> 
    @property (nonatomic, strong) IMInterstitial *interstitial; 
    @end
    

    Swift

    import UIKit
    import InMobiSDK
    class ViewController: UIViewController, IMInterstitialDelegate {
        var interstitial: IMInterstitial?
    }
    	
  2. Instantiate the interstitial object. Your viewDidLoad method in ViewController.m file should look like this:
     

    Objective C

    -(void)viewDidLoad { 
        [super viewDidLoad]; 
        self.interstitial = [[IMInterstitial alloc] initWithPlacementId:<Insert your placement ID here>]; 
        self. interstitial.delegate = self; 
        [self.interstitial load]; 
    } 
    

    Swift

    override func viewDidLoad() { 
        super.viewDidLoad() 
        interstitial = IMInterstitial.init(placementId: <Insert your placement ID here>) 
        interstitial?.delegate = self 
        interstitial?.load() 
    } 
    
  3. For ad status callbacks, implement the delegate property of IMInterstitial. The following callbacks are supported:

    Objective C

    // Notifies that the ad is received with Meta info. 
    - (void)interstitial:(IMInterstitial *)interstitial didReceiveWithMetaInfo:(IMAdsMetaInfo*)metaInfo { 
        NSLog(@"interstitial didReceiveAdWithMetaInfo"); 
    } 
    - (void)interstitialDidFinishLoading:(IMInterstitial *)interstitial { 
        NSLog(@"interstitialDidFinishLoading"); 
    } 
    - (void)interstitial:(IMInterstitial *)interstitial didFailToLoadWithError:
    (IMRequestStatus *)error { 
        NSLog(@"Interstitial failed to load ad"); 
        NSLog(@"Error : %@",error.description); 
    } 
    - (void)interstitial:(IMInterstitial *)interstitial didFailToPresentWithError:
    (IMRequestStatus *)error { 
        NSLog(@"Interstitial didFailToPresentWithError"); 
        NSLog(@"Error : %@",error.description); 
    } 
    - (void)interstitialWillPresent:(IMInterstitial *)interstitial { 
        NSLog(@"interstitialWillPresent"); 
    } 
    - (void)interstitialDidPresent:(IMInterstitial *)interstitial { 
        NSLog(@"interstitialDidPresent"); 
    } 
    - (void)interstitialWillDismiss:(IMInterstitial *)interstitial { 
        NSLog(@"interstitialWillDismiss"); 
    } 
    - (void)interstitialDidDismiss:(IMInterstitial *)interstitial { 
        NSLog(@"interstitialDidDismiss"); 
    } 
    - (void)userWillLeaveApplicationFromInterstitial:(IMInterstitial *)interstitial { 
        NSLog(@"userWillLeaveApplicationFromInterstitial"); 
    } 
    - (void)interstitial:(IMInterstitial *)interstitial didInteractWithParams:
    (NSDictionary *)params { 
        NSLog(@"InterstitialDidInteractWithParams"); 
    }
    

    Swift

    //Notifies that the ad is received with Meta info. 
    public func interstitial(_ interstitial: IMInterstitial?, didReceiveWith metaInfo: IMAdMetaInfo?) { 
        NSLog("Interstitial ad is received with meta info %@", metaInfo) 
    } 
    public func interstitialDidFinishLoading(_ interstitial: IMInterstitial!) { 
        NSLog("[ViewController %@]", #function) 
    } 
    public func interstitial(_ interstitial: IMInterstitial!, didFailToLoadWithError error:
    IMRequestStatus!) { 
        NSLog("[ViewController %@]", #function) 
        NSLog("Interstitial ad failed to load with error %@", error) 
    } 
    public func interstitialWillPresent(_ interstitial: IMInterstitial!) { 
        NSLog("[ViewController %@]", #function) 
    } 
    public func interstitialDidPresent(_ interstitial: IMInterstitial!) { 
        NSLog("[ViewController %@]", #function) 
    } 
    public func interstitial(_ interstitial: IMInterstitial!, didFailToPresentWithError error:
    IMRequestStatus!) { 
        NSLog("[ViewController %@]", #function) 
    } 
    public func interstitialWillDismiss(_ interstitial: IMInterstitial!) { 
        NSLog("[ViewController %@]", #function) 
    } 
    public func interstitialDidDismiss(_ interstitial: IMInterstitial!) { 
        NSLog("[ViewController %@]", #function) 
    } 
    public func interstitial(_ interstitial: IMInterstitial!, didInteractWithParams params:
    [AnyHashable : Any]!) { 
        NSLog("[ViewController %@]", #function) 
    } 
    public func userWillLeaveApplication(from interstitial: IMInterstitial!){ 
        NSLog("[ViewController %@]", #function) 
    }
    
  4. To show the Interstitial Ad, use the following code:

    Objective C

    [self.interstitial showFromViewController:self];
    //[self.interstitial showFromViewController:self withAnimation:kIMInterstitialAnimationTypeCoverVertical];
    
    

    Swift

    interstitial?.show(from: self)
    //interstitial?.show(from: self, with:.coverVertical)
    
    

Objective C

Here are the possible animation types:

  • kIMInterstitialAnimationTypeCoverVertical
  • kIMInterstitialAnimationTypeFlipHorizontal
  • KIMInterstitialAnimationTypeNone

Important:

  • Make sure that interstitialDidFinishLoading callback is received before making a call to showFromViewController. Otherwise, the error callback interstitial:didFailToPresentScreenWithError: will be given.
  • Every time an interstitial ad is shown and subsequently dismissed, you will need to invoke [self.interstitial load]; again. Without this, you won't be able to call showFromViewController again.

Swift

Here are the possible animation types:

  • coverVertical
  • flipHorizontal
  • None

Important:

  • Make sure that interstitialDidFinishLoading callback is recieved before making a call to show(from viewController: UIViewController!). Otherwise, the error callback interstitial(_ interstitial: IMInterstitial!, didFailToLoadWithError error: IMRequestStatus!) will be given.
  • Every time an interstitial ad is shown and subsequently dismissed, you will need to invoke interstitial?.load() again. Without this, you won't be able to call show(from viewController: UIViewController!) again.


InMobi Custom Frames

Supercharge the full-screen experience by making the most of your in-game assets like characters, themes, and interactions to introduce interstitial ads which look like an extension of your game design.


Getting Started with Custom Frames

In order to activate Custom Frames on your interstitial ads, integrate with InMobi Interstitial ads and activate “Custom Frames” while creating the Interstitial placement.

  1. Specify the device you want to target the ad, and then select the orientation of your interstitial ad.
  2. Upload a frame, or select one of the preset frames. Ensure that you comply with the “Custom Frame Specification” mentioned in the section below.
  3. Upload a close button, or select one of the preset close buttons. You can choose the placement of the close button at either the top left or top right corner.
  4. Change the creative size to fit the interstitial ad and modify the placement of the creative using the “Creative Ad Position” to fit the interstitial ad perfectly. Ensure that the creative fits into the inner container of the frame and does not spill out.


More Details

Understanding Device Size and Orientation

InMobi Custom Frames are tied to a particular device size and orientation. This is important because you upload, or select, a specific frame to go with the device size and orientation combination.

Note

  • If you have an app that is usable in both landscape and portrait modes, and you make interstitial ad calls in both modes, you must create two custom frame ad units, one for each landscape and portrait. InMobi will automatically pick the right template based on the ad request orientation.
  • If you use the same placement Id for phones and tablets, you must create separate custom frame ad units for phones and tablets to make sure you can serve interstitial units with custom frames across all devices.


Understanding InMobi Default Templates

If you have at least one InMobi Custom Frame, you will see a listing page containing different custom frames, along with their performance metrics. The first item is called InMobi Default. You cannot edit this template, nor can you pause or delete this unit.


InMobi Default templates are used in two cases:

  • When an incoming ad request and ad combination does not match any custom frame unit created.
  • When InMobi, through its optimization logic, detects that not using a custom frame might actually give better performance.
  • For example, there are certain creatives that will not work with custom frames. In this case, the InMobi Default template is used to make sure that InMobi can render these high eCPM creatives in your ad slot.

Note

You cannot turn off the InMobi Default template.


Custom Frame Specification

Please keep in mind the following when designing custom frames for your interstitial ads:

  • The ad will appear in a transparent area (called the 'inner container') inside the frame.
  • In the image above, the inner container is the section in blue.
  • The inner container must be a rectangular figure with the same aspect ratio as the interstitial ad slot. That is, 2:3 for a 320x480 slot, 8:5 for a 1280x800 slot, and so on.
  • The inner container must be a transparent area.
  • The inner container cannot be less than 70% of the interstitial size. This means that for a 320x480 interstitial slot, the inner container should not be less than 224x336.
  • The inner edges of the frame must not be cluttered. That is, it should not disrupt the inner ad area. Strict rectangular corners, or very slightly rounded corners are allowed.


Refer the table below for the sizes supported:

Device Orientaton Frame Size Inner Container Size
Smartphone 1 Portrait 320x480 (RGB, 72ppi) 240x360
Smartphone 1 Landscape 480x320 (RGB, 72ppi) 360x240
Smartphone 2 Portrait 320x568 (RGB, 72ppi) 250x444
Smartphone 2 568x320 (RGB, 72ppi) 444x250  
Tablet 1 Portrait 768x1024 (RGB, 72ppi) 576x768
Tablet 1 1024x768 (RGB, 72ppi) 768x576  
Tablet 2 Portrait 800x1280 (RGB, 72ppi) 600x960
Tablet 2 1280x800 (RGB, 72ppi) 960x600  


Create the close button on a transparent area with an aspect ratio of 1:1. The allowed sizes are 15x15 px or 40x40 px.

Note

  • Frames and Close buttons must be uploaded in PNG format.
  • Background color and translucency are added by the SDK.


A/B Testing

Experiment with custom frames for the same interstitial placement by creating multiple concepts (for example, different colors, different characters, with and without animation, and so on) and distributing exposure across these concepts.

  • When testing new concepts, limit exposure to them to ensure that the monetization potential of your property is not affected. To limit the number of ad impressions served on the new concepts, you can select the Limit Exposure check box.
  • Once you are sure of the performance of the concept, you can uncheck the Limit Exposure check box.

On This Page

Last Updated on: 14 Oct, 2020