Follow

How to Set Up Rewarded Video (Virtual Currency)

Rewarded Video (Virtual Currency)

enables you to offer in-app rewards to users

after they finish viewing a video ad.

 

Overview

  • Rewarded Video is only available for aerWall (Rewarded) Ad Placements
  • Rewarded Video only applies to Video Ads

 

 

Step 1: Create an Ad Placement

 
Please note that you'll need to set up an app first before adding an aerWall Rewarded placement to it.
For detailed instructions on How to Add an App/Site, please click here.

 

  1. Go to the "Inventory" tab in the nav bar.
  2. Press the pink "+" button next to the app you want to add an ad placement to.
  3. Select the Ad Product that you want delivered to this new Ad Placement. For each ad product configured and saved, a separate placement will be created. 

 

Rewarded.gif

 

Step 2: Select aerWall (Rewarded) Ad Product

  1. Enter a Name for this Ad Placement. This will be used throughout the platform to reference this Ad Placement.
  2. Select whether you would like the video ad to be Skippable or not.
  3. Set a Frequency Cap for the video ad.
  4. Enter the Currency Name. This is the name that will be returned on the VC completed event callback.
  5. Enter the Reward Amount per completed view. This is the amount that will be returned on the VC completed event callback.
  6. When you are done, click on Next!

 

Step 3: Integrate Virtual Currency Events 

iOS SDK

 

For the iOS AerServ SDK, Virtual Currency information will be passed through the ASInterstitialViewControllerDelegate protocol. The parent view controller will conform to this protocol. When creating your ASInterstitialViewController object, be sure to set the delegate to the parent view controller.

 

Inside the parent view controller, define these two methods:

 

- (void)interstitialViewControllerDidVirtualCurrencyLoad:(ASInterstitialViewController *)viewController vcData:(NSDictionary *)vcData;
- (void)interstitialViewControllerDidVirtualCurrencyReward:(ASInterstitialViewController *)viewController vcData:(NSDictionary *)vcData;

 

From these two callback methods, all pertinent Virtual Currency information will be received. Please check the ASInterstitialViewController’s header file to see more information about the dictionary’s contents.

 

 

Android SDK

For the Android AerServ SDK, Virtual Currency information will be passed through the VC_READY (fires before a VC enabled Ad plays) and VC_REWARDED (fires after a VC enabled Ad has completed) Events through the Event Listener you have configured. Cast the first object of the args parameter to an AerServVirtualCurrency object and use .getName() and .getAmount() to get the VC Name and Amount configured for that Ad Placement. 

 

See example below:

 

AerServEventListener listener = new AerServEventListener(){
    @Override
public void onAerServEvent(AerServEvent event, List args){
        switch (event) {
            case VC_REWARDED:
                AerServVirtualCurrency vc = (AerServVirtualCurrency) args.get(0);
                // do something here with your virtual currency!
                log.d("AerServVirtualCurrency", "VC rewarded: " + vc.getAmount() + " " + vc.getName());
        }
    }
}

AerServConfig config = new AerServConfig(this, "1003694").setEventListener(listener);
new AerServInterstitial(config).show();

 

 

 

Unity SDK

In order to enable Virtual Currency callbacks for Unity, the following two Events are required to be added to the Unity Project:


 /** Event Callback**/
        [MonoPInvokeCallback (typeof (OnAerServEvent))]
        static void aerServEventCallBack(int eventType, String args) {

            String[] argsArr = (args != null) ? args.Split('|') : null;

            switch(eventType) {
         
                case SDK.VC_READY:
                    message += del + "VC_READY invoked! Name: " + argsArr[0] + " Amount: " + argsArr[1];
                    break;
                case SDK.VC_REWARDED:
                    message += del + "VC_REWARDED invoked! Name: " + argsArr[0] + " Amount: " + argsArr[1];
                    break;
                default:

 

 

Step 4: Test Virtual Currency with Test Ad Placements (Optional)

To test VC, go to the placement edit page and set your rewarded plc to "test" mode and enter your VC information. This will allow test ads to run through your placement to help verify your integration. When you are done with the verification process, please remember to uncheck the "test mode" checkbox to begin receiving live ads.

Summary of SDK mediation networks that support Virtual Currency events:

 

PARTNER
AD TYPE
VC ENABLED
Interstitial Yes
Interstitial Yes
Interstitial Yes
Interstitial Yes
Interstitial Yes

 

 

 

 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments