Skip to main content

Rewarded Video Ads

Rewarded ad units enable users to play games, take surveys, or watch videos to earn in-app rewards, such as coins, extra lives, or points. You can set different rewards for different ad units, and specify the reward values and items users will receive.

Benefits of Rewarded Video Ads

  • Increase revenue, Rewarded video ads can increase your app revenue by 20% to 40%. eCPM for rewarded videos is the highest when compared to other types of mobile video ads.
  • Increase in-app purchases, Rewarded video ads encourage free users to make in-app purchases by giving them a taste of premium features they’re missing. Users who watch rewarded video ads are six times more likely to make in-app purchases.
  • Increase user engagement and retention, Users prefer watching reward video ads to paying for premium features. This encourages them to continue playing your game for longer, which in turn increases retention, engagement, and LTV.
caution

You should finish these steps before releasing.

Load the ad

Yodo1U3dRewardAd.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.
Yodo1U3dRewardAd.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 = Yodo1U3dRewardAd.GetInstance().IsLoaded();

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

// Show ad with placement name, like app_start, level_end
if (isLoaded)
{
Yodo1U3dRewardAd.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 RewardAdLoader : MonoBehaviour
{
private int retryAttempt = 0;

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

private void SetupEventCallbacks()
{
Yodo1U3dRewardAd.GetInstance().OnAdLoadedEvent += OnRewardAdLoadedEvent;
Yodo1U3dRewardAd.GetInstance().OnAdLoadFailedEvent += OnRewardAdLoadFailedEvent;
Yodo1U3dRewardAd.GetInstance().OnAdOpenedEvent += OnRewardAdOpenedEvent;
Yodo1U3dRewardAd.GetInstance().OnAdOpenFailedEvent += OnRewardAdOpenFailedEvent;
Yodo1U3dRewardAd.GetInstance().OnAdClosedEvent += OnRewardAdClosedEvent;
Yodo1U3dRewardAd.GetInstance().OnAdEarnedEvent += OnRewardAdEarnedEvent;
}

private void LoadRewardAd()
{
Yodo1U3dRewardAd.GetInstance().LoadAd();
}

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

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

private void OnRewardAdOpenedEvent(Yodo1U3dRewardAd ad)
{
// Code to be executed when an ad opened
}

private void OnRewardAdOpenFailedEvent(Yodo1U3dRewardAd ad, Yodo1U3dAdError adError)
{
// Code to be executed when an ad open fails.
LoadRewardAd();
}

private void OnRewardAdClosedEvent(Yodo1U3dRewardAd ad)
{
// Code to be executed when the ad closed
LoadRewardAd();
}

private void OnRewardAdEarnedEvent(Yodo1U3dRewardAd ad)
{
// Code executed when getting rewards
}
}

Video Tutorial

Best Practices

1. Preload

We recommend that you preload the rewarded video 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 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.