> For the complete documentation index, see [llms.txt](https://ub-docs.adster.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ub-docs.adster.tech/how-to-render-an-ad/interstitial-ad.md).

# Interstitial Ad

Before loading ads, have your app initialize Adster Unity Bridge SDK.\
This needs to be done only once, ideally at app launch.

1. Call `LoadInterstitialAd()`method as per below format

<pre class="language-csharp"><code class="lang-csharp"><strong>AdsterBridgeUtil.LoadInterstitialAd("Your_placement_name", "gameobject_name_goes_here");
</strong></code></pre>

2. Declare `OnInterstitialAdEvent()` method as per below format

{% tabs %}
{% tab title="C#" %}

```csharp
public void OnInterstitialAdEvent(string message)
    {
        // Process ad events based on the message
        if (message == "AdLoaded")
        {
            Debug.Log("Interstitial ad successfully loaded.");
        }
        else if (message.StartsWith("AdFailed:"))
        {
            string error = message.Substring("AdFailed:".Length);
            Debug.LogError($"Failed to load interstitial ad: {error}");
        }
        else if (message == "AdOpened")
        {
            Debug.Log("Interstitial ad opened.");
        }
        else if (message == "AdClosed")
        {
            Debug.Log("Interstitial ad closed.");
        }
        else if (message == "AdClicked")
        {
            Debug.Log("Interstitial ad clicked.");
        }
        else if (message == "AdImpression")
        {
            Debug.Log("Interstitial ad impression recorded.");
        }
        else if (message.StartsWith("AdRevenuePaid"))
        {
            Debug.Log(message);
            string[] parts = message.Split('|');
            if (parts.Length == 4)
            {
                string revenue = parts[1];
                string adUnit = parts[2];
                string network = parts[3];
                Debug.Log($"[AdRevenue] Revenue: {revenue}, AdUnit: {adUnit}, Network: {network}");
            
            return;
            }
        }
    }
```

{% endtab %}
{% endtabs %}

3. Inside the `AdLoaded` callback method invoke `ShowInterstitialAd()` method as below to show AdSter interstitial ad above any scene/view.

{% tabs %}
{% tab title="C#" %}

```csharp
AdsterBridgeUtil.ShowInterstitialAd("gameobject_name_goes_here");
```

{% endtab %}
{% endtabs %}
