SDK Documentation
HomeBlogSign up
English
English
  • 🏠Homepage
  • 🧪Test Ad Units
  • Privacy
    • ✅Google Data Safety
  • Android SDK
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Native (Google)
      • Targeting
      • Revenue reporting
    • 🙎User consent
    • 🔓Privacy
    • 🛠️ProGuard
  • iOS SDK
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Native (Google)
      • Revenue reporting
    • 🙍User consent
    • 🔓Privacy
  • Unity SDK
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Targeting
      • Revenue reporting
    • 🙎User consent
    • 🔓Privacy
  • Flutter SDK
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Native (Google)
      • Targeting
      • Revenue reporting
    • 🙎User consent
    • 🔓Privacy
  • React Native
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Targeting
      • Revenue reporting
    • 🙎User consent
    • 🔓Privacy
  • Web SDK
    • ⌨️SDK integration
Con tecnología de GitBook
En esta página
  • Integration
  • Listener configuration
  • Example
  1. Unity SDK
  2. SDK integration

Rewarded

Integration

To make use of rewarded ads, it is needed to request their load at some point inside the app, being recommended to do it as soon as possible.

Below you can find an example of how to load and show an rewarded ad:

// Create a rewarded
WortiseRewarded rewardedAd = new WortiseRewarded(
    "Wortise Ad Unit ID"
);

// Request an ad
rewardedAd.LoadAd();

// Show an ad if available
if (rewardedAd.IsAvailable) {
    rewardedAd.ShowAd();
}

Listener configuration

Some listeners can be added to receive the different events that may occur during the rewarded lifecycle. For this, you can make use of the following attributes that are available at the WortiseRewarded class:

  • OnClicked

  • OnCompleted

  • OnDismissed

  • OnFailedToLoad

  • OnFailedToShow

  • OnImpression

  • OnLoaded

  • OnRevenuePaid

  • OnShown

Example

rewardedAd.OnClicked      += () => Debug.Log('Rewarded clicked');
rewardedAd.OnCompleted    += (reward) => Debug.Log('Rewarded completed');
rewardedAd.OnDismissed    += () => Debug.Log('Rewarded dismissed');
rewardedAd.OnFailedToLoad += () => Debug.Log('Rewarded failed to load');
rewardedAd.OnFailedToShow += () => Debug.Log('Rewarded failed to show');
rewardedAd.OnImpression   += () => Debug.Log('Rewarded impression');
rewardedAd.OnLoaded       += () => Debug.Log('Rewarded loaded');
rewardedAd.OnRevenuePaid  += (data) => Debug.Log('Rewarded revenue paid');
rewardedAd.OnShown        += () => Debug.Log('Rewarded shown');
AnteriorInterstitialSiguienteTargeting

Última actualización hace 3 días

⌨️