Interstitial Ad Format

Interstitial ads are full-screen ads that cover the interface of their host app. They are typically displayed at natural transition points in the flow of an app, such as between activities or during a pause between levels in a game. The RTB-Stack SDK makes it easy to integrate and manage interstitial ads in Unity.

1. Load and Show Interstitial Ads

Follow these steps to load and display interstitial ads when necessary:

Import RTB-Stack SDK

First, import the SDK into your Unity class:

using Plugins.RtbStackSDK;

Load an Interstitial Ad

To load an interstitial ad, call the following method:

RtbStackSDK.LoadInterstitial("ENDPOINT_REQUEST_URL", "TAG_ID");

Details:

  • ENDPOINT_REQUEST_URL: Obtain this from the Edit Endpoint window as described in the following article.
  • TAG_ID: Use a random string value as a Tag ID for reporting purposes.

2. Listen for Interstitial Events

Subscribe to interstitial ad events to track loading, errors, and clicks:

RtbStackSDK.onInterstitialAdLoadedEvent += onInterstitialAdLoaded;
RtbStackSDK.onInterstitialAdFailedToLoadEvent += onInterstitialAdFailedToLoad;
RtbStackSDK.onInterstitialAdClickedEvent += onInterstitialAdClicked;

void onInterstitialAdLoaded() {
    // Handle interstitial loaded
}

void onInterstitialAdFailedToLoad(string error) {
    // Handle interstitial load failure
}

void onInterstitialAdClicked(string url) {
    // Handle interstitial click
}

3. Show and Destroy Interstitial Ads

Once the interstitial ad is loaded, you can display it using the following method:

RtbStackSDK.ShowInterstitial();

After the ad is closed, destroy the interstitial to free up resources:

RtbStackSDK.DestroyInterstitial();

4. Interstitial Options

You can configure the following interstitial options:

Click Action

Set the click action for the interstitial ad:

RtbStackSDK.SetInterstitialClickThroughAction(RtbStackSDK.ClickThroughAction.OPEN_DEVICE_BROWSER);

The available click actions are:

  • OPEN_SDK_BROWSER
  • OPEN_DEVICE_BROWSER
  • RETURN_URL
Updated on March 14, 2025