Skip to main content

Rewarded Interstitial Ads

Rewarded interstitial ad units automatically appear and show full-page ads in your app that reward users for viewing ads. Place them at natural breaks & transitions in your app's interface, such as after level completion in a gaming app.

Benefits of Rewarded Interstitial Ads

  • Encourages longer sessions as you can implement rewarded interstitial ads to reward players in-game after they’ve completed a video view. Also, gamers are motivated to continue playing, resulting in longer sessions.
  • Improve user experience, leading to higher retention as this skippable, non-intrusive ad format doesn’t interrupt players during an app event
  • Make an impression: These interactive, full-screen ads can grab attention when placed at natural transition points or breaks in the game (e.g. in between activities or game levels).
  • Monetise more players: Rewarded interstitials can be tested to monetise players who may not engage with rewarded video and in-app purchases.
caution

You should finish these steps before releasing.

Load the ad

Yodo1U3dRewardedInterstitialAd.GetInstance().LoadAd();
Setup the auto delay load

Loading a new ad from OnAdLoadFailedEvent() without delay is not recommended. If a new ad has to be loaded immediately on OnAdLoadFailedEvent(), then the auto-delay configuration variable must be set to true to limit ad load retries, thus avoiding continuous failed ad requests and ANR issues.

// Remember to call this function before SDK init.
Yodo1U3dRewardedInterstitialAd.GetInstance().autoDelayIfLoadFail = true;

Display the ad

You can show the ad using this code, but we recommend using the ad events as you’ll be able to show the ad once it’s loaded. You can check the full script provided below.

bool isLoaded = Yodo1U3dRewardedInterstitialAd.GetInstance().IsLoaded();

// Show ad without placement name
if (isLoaded)
{
Yodo1U3dRewardedInterstitialAd.GetInstance().ShowAd();
}

// Show ad with placement name, like app_start, level_end
if (isLoaded)
{
Yodo1U3dRewardedInterstitialAd.GetInstance().ShowAd("Your placement ID");
}

Configure the ad events

The MAS SDK fires several events to inform you of ad availability.


using Yodo1.MAS;
using System;

public class RewardedInterstitialAdLoader : MonoBehaviour
{
private int retryAttempt = 0;

private void Start()
{
SetupEventCallbacks();
LoadRewardedInterstitial();
}

private void SetupEventCallbacks()
{
Yodo1U3dRewardedInterstitialAd.GetInstance().OnAdLoadedEvent += OnRewardedInterstitialAdLoadedEvent;
Yodo1U3dRewardedInterstitialAd.GetInstance().OnAdLoadFailedEvent += OnRewardedInterstitialAdLoadFailedEvent;
Yodo1U3dRewardedInterstitialAd.GetInstance().OnAdOpenedEvent += OnRewardedInterstitialAdOpenedEvent;
Yodo1U3dRewardedInterstitialAd.GetInstance().OnAdOpenFailedEvent += OnRewardedInterstitialAdOpenFailedEvent;
Yodo1U3dRewardedInterstitialAd.GetInstance().OnAdClosedEvent += OnRewardedInterstitialAdClosedEvent;
Yodo1U3dRewardedInterstitialAd.GetInstance().OnAdEarnedEvent += OnRewardedInterstitialAdEarnedEvent;
}

private void LoadRewardedInterstitial()
{
Yodo1U3dRewardedInterstitialAd.GetInstance().SetAdPlacement("Your placement ID");
Yodo1U3dRewardedInterstitialAd.GetInstance().LoadAd();
}

private void OnRewardedInterstitialAdLoadedEvent(Yodo1U3dRewardedInterstitialAd ad)
{
// Code to be executed when an ad finishes loading.
retryAttempt = 0;
Yodo1U3dRewardedInterstitialAd.GetInstance().ShowAd();
}

private void OnRewardedInterstitialAdLoadFailedEvent(Yodo1U3dRewardedInterstitialAd ad, Yodo1U3dAdError adError)
{
// Code to be executed when an ad request fails.
retryAttempt++;
double retryDelay = Math.Pow(2, Math.Min(6, retryAttempt));
Invoke("LoadRewardedInterstitial", (float)retryDelay);
}

private void OnRewardedInterstitialAdOpenedEvent(Yodo1U3dRewardedInterstitialAd ad)
{
// Code to be executed when an ad opened
}

private void OnRewardedInterstitialAdOpenFailedEvent(Yodo1U3dRewardedInterstitialAd ad, Yodo1U3dAdError adError)
{
// Code to be executed when an ad open fails.
LoadRewardedInterstitial();
}

private void OnRewardedInterstitialAdClosedEvent(Yodo1U3dRewardedInterstitialAd ad)
{
// Code to be executed when the ad closed
LoadRewardedInterstitial();
}

private void OnRewardedInterstitialAdEarnedEvent(Yodo1U3dRewardedInterstitialAd ad)
{
// Code executed when getting rewards
}
}

Impression-Level User Revenue

Starting in SDK version 4.13.2, you can access impression-level user revenue data on the client side. You can use this data to compare different sources and campaigns.

You can share impression-level ad revenue data with your mobile measurement partner of choice.

You can retrieve the revenue amount in all ad lifecycle callbacks. The following example shows how to do this within callback:

Yodo1U3dRewardedInterstitialAd.GetInstance().OnAdPayRevenueEvent += OnRewardedInterstitialAdPayRevenueEvent;

private void OnRewardedInterstitialAdPayRevenueEvent(Yodo1U3dRewardedInterstitialAd ad, Yodo1U3dAdValue adValue)
{
double revenue = adValue.Revenue;
string currency = adValue.Currency;
}

You can also retrieve a precision evaluation for the revenue value, as shown in the following example:

string revenuePrecision = adValue.RevenuePrecision;

Best Practices

1. Preload

We recommend that you preload the rewarded interstitial ad before showing it. This will ensure the ad is ready to be displayed when needed.

2. Placement

We recommend setting the placement name when you load and show the ad. This will help you track each placement's performance in the dashboard.

3. Handle Failures

If the ad fails to load, you should NOT try to reload immediately. Instead, it would be best if you waited a while before reloading the ad again. We recommend waiting at least 10 seconds before trying to fill the ad.