Overview
About Interstitial Ads
Interstitial ads are full-screen ads that cover the interface of your app. They're typically displayed at natural transition points in the flow of your app, such as between activities or during the pause between levels in a game. Some interstitial ads are rewarded ads.
About Rewarded Ads
Rewarded ads deliver a great user experience by offering users something of value in exchange for watching or engaging with an ad. This exchange is typically a reward within your app, such as extra lives in a game, virtual currency, or a hint in a puzzle (you determine the nature and amount of the reward). Shown at natural breaks in the app, rewarded video ads deliver high revenue, especially if you follow our recommendation to make them non-skippable.
There are two ways to integrate rewarded ads: in-app rewards (recommended, and described below), or server-to-server callbacks (refer to our FAQ article on this topic). With in-app rewards, when a user successfully completes an ad view or clicks the download button, you can reward them directly in your app. The main benefit of this approach is that it's simple to implement. If you're looking for something quick, and you're not concerned with replay attacks, this should do it.
Vungle now offers a variety of ad formats with Dynamic Template ads. Unlike the traditional ad format, in which an ad play consists of a video play followed by an end card, we offer templates where the call-to-action (CTA) button is available during the video play. The users who complete the video ad, as well as those who click the button, should be rewarded.
Step 1. Complete Basic Integration
To integrate interstitial and rewarded ads in your Windows app, begin by following the instructions in the basic integration article. This article contains supplementary information and assumes you have completed basic integration.
Step 2. Load and Play an Ad
Load an Ad for a Placement
To load an ad, call LoadAd
and allow enough time to download the ad assets. Then wait for OnAdPlayableChanged
to be called:
sdkInstance.LoadAd(“placement_id”);
Note: Placement IDs are case-sensitive.
Sample code:
private void OnLevelStart(Object sender, RoutedEventArgs e)
{
sdkInstance.LoadAd(“placement_id”);
}
Play an Ad
Play an ad with the default configuration:
await sdkInstance.PlayAdAsync(new AdConfig(), “placement_id”);
Sample code:
private async void OnLevelComplete(Object sender, RoutedEventArgs e)
{
await sdkInstance.PlayAdAsync(new AdConfig(), “placement_id”);
}
You can optionally customize the ads you play by providing options to AdConfig
object.
Sample code:
private async void PlayCustomizedAd(Object sender, RoutedEventArgs e)
{
AdConfig adConfig = new AdConfig();
adConfig.Orientation = DisplayOrientations.Portrait;
adConfig.SoundEnabled = false;
await sdkInstance.PlayAdAsync(adConfig, placement2);
}
Step 3. Customize Rewarded Ads (Optional)
These are the available properties in the AdConfig
object instance.
Options |
Default Value/ |
Description |
---|---|---|
|
null string |
Passes the unique user ID to your application to verify that this user should be rewarded for watching an rewarded ad when server-to-server callback is used for verification. |
|
“Close this ad?” string |
Sets the title of the confirmation dialog when skipping an rewarded ad. |
|
“Are you sure you want to skip this ad? You must finish watching to claim your reward.” string |
Sets the body of the confirmation dialog when skipping an rewarded ad. |
|
"Close" string |
Sets the 'cancel' button text of the confirmation dialog when skipping an rewarded ad. |
|
"Continue" string |
Sets the 'keep watching' button text of the confirmation dialog when skipping an rewarded ad. |
The options for SoundEnabled
and rewarded ad close dialog for Dynamic Template ads are available on the dashboard to configure. Programmatic configuration will only apply to legacy ads.