Opt-in Video Ad

This article will go through all the steps required to display an Opt-in Video ads in your application through AdMob mediation.

Opt-in Video Ads are skippable fullscreen videos. They allow you to reward users with in-app items for watching video ads.

Opt-in Video Ads can only be served to users who explicitly and previously chose to view a rewarded ad. You can specify the reward values associated with the Ad units in your application and set different rewards for different Ad units.

Once configuration is done, users start receiving the reward for viewing the video ads without needing to install anything on their device.

Requirements

You have registered an application on your Ogury Dashboard. If not, please refer to the Getting started section before the next steps.

Step 1: Create an Opt-in Video Ad ad unit

In all the following code samples, we will refer to this Ad unit id by using the string YOUR_OGURY_AD_UNIT_ID.

Step 2: Create Mediation Group

Follow the AdMob guide to create a mediation group for your Rewarded ad unit.

Step 3: Add Ogury in your Mediation Group

In order to display Ogury Opt-in Video Ad through AdMob mediation, you need to configure a Custom Event for Ogury in your mediation group.

  • Go on the Mediation Group page, and click on the mediation group you want.

  • Click on ADD CUSTOM EVENT, in the Waterfall section

  • Enter Ogury as Label, set an eCPM and click on CONTINUE.

For eCPM, you need to set the value that you agreed with your Ogury Account Manager.

  • Next to the name of your Rewarded ad unit, enter the following configuration and click on DONE:

Class Name:

com.ogury.mobileads.OguryOptinVideoAdCustomEvent

In case you are already using the old custom event class (com.admob.mobileads.PresageOptinVideoCustomEvent),do not update your existing ad unit mapping to use the new custom event class (com.ogury.mobileads.OguryOptinVideoAdCustomEvent).A new ad unit and a new mapping should be created in order to not impact the users already using an older library. Ads will be served with the new SDK even if the custom event class is not updated.

Parameter:

{"assetKey":"OGY-XXXXXXXXXXXX","adUnitId":"YOUR_OGURY_AD_UNIT_ID"}
  • Click on SAVE.

If you wish to set up multi-placements for Ogury, you can add Ogury multiple times as an ad source / custom event inside your mediation group. Each time, you should make sure to use the corresponding Ad unit ids from Ogury dashboard, with the agreed eCPM value.

For mediation, if you are using a play-services-ads version lower than 17.2.0, use the bellow mediation version

dependencies {
  implementation 'co.ogury:ogury-mediation-admob:4.+'
}

If you are using a play-services-ads version greater than 17.1.3 and have switched to the new Reward Api use the bellow mediation version

dependencies {
 implementation 'co.ogury:ogury-mediation-admob:5.+'
}

You have to do this change due to new Reward Api changes.

Step 4: Test your integration

As our algorithm works with personified targeting, you may not receive any ad while testing your application.

You can test your integration by adding the suffix _test to your interstitial ad unit id, for more details go to Test your implementation page.

Note that if you have just registered your application in the Ogury Dashboard, it will take around 15 minutes until you can successfully load an ad.

Additionally, you can follow the integration logs to get useful information on your integration status and any issue that might occur when displaying ads. Connect your device to Android Studio. Then filter the logs after the OGURY keyword to separate them from everything else.

Last updated