-
Notifications
You must be signed in to change notification settings - Fork 4
App Open Ad object
⚡ Before you start
Make sure you have correctly initialized Mediation Manager via Script or Unity Editor.
Implementation by UnityEditor | Script C#
- Add an AppOpenAdObject to the scene
- Load Ad callbacks
- Content callbacks
- Unity Events sample
- Use AdObject from script
- Cold starts and loading screens
- Best practices
App open ads are a special ad format intended for publishers wishing to monetize their app load screens. App open ads can be closed at any time, and are designed to be shown when your users bring your app to the foreground. App open ads automatically show a small branding area so users know they're in your app.
This guide explains how to integrate app open ads into a Unity app.
Pros compared to Interstitial ads:
- Much faster ad loading.
- End user-friendly interface.
Cons:
- Only Google Ads (AdMob) is supported.
- Add an GameObject to your scene using
GameObject > Create Empty
in the Unity Editor. - Add Component
CleverAdsSolutions/AppOpen Ad Object
in the inspector to new GameObject. - Select Manager ID from settings asset for each runtime platform.
- Invoke
Load()
method to load ad. - Invoke
Show()
method to show ad.

-
Autoshow loaded Ad when user open the app
The ad will be shown when the user opens the app. Additionally, the ad must be loaded, and this component must not be destroyed.
-
On Ad Loaded
The event is invoked when the ad has finished loading. -
On Ad Failed To Load
The event is invoked when the ad fails to load. The Message parameter describes the type of failure that occurred.
-
On Ad Failed To Show
The event is invoked when the ad failed to show. The Message parameter describes the type of failure that occurred. -
On Ad Shown
The event is invoked when the ad is shown. -
On Ad Clicked
The event is invoked when the user clicks on the ad. -
On Ad Impression
The event is invoked when the ad count impression with Impression Level Data andAdMetaData
. -
On Ad Closed
The event is invoked when the ad is closed.
You can implement functions that correspond to ad callbacks. For example, if you want to handle when the app open ad fails to show:
- Create a function compatible with the ad callback in custom component.
public void OnAppOpenAdFailedToShow(string reason) {
Debug.Log("AppOpen ad failed to show: " + reason);
}
- Attach the script which contains the above function to any GameObject in the scene.
- Click the + button, then drag & drop the GameObject that you've attached the script to.
- Select the function that you want to link to the ad callback. For the parameterized ad callbacks, select the function to accept the dynamic variable so you can get the parameter value from the SDK.
Get the interstitial ad instance from the script:
AppOpenAdObject appOpenAd = adObject.GetComponent<AppOpenAdObject>();
Load the ad:
appOpenAd.Load();
Show the ad:
appOpenAd.Show();
The documentation thus far assumes that you only show app open ads when users foreground your app when it is suspended in memory. "Cold starts" occur when your app is launched but was not previously suspended in memory.
An example of a cold start is when a user opens your app for the first time. With cold starts, you won't have a previously loaded app open ad that's ready to be shown right away. The delay between when you request an ad and receive an ad back can create a situation where users are able to briefly use your app before being surprised by an out of context ad. This should be avoided because it is a bad user experience.
The preferred way to use app open ads on cold starts is to use a loading screen to load your game or app assets, and to only show the ad from the loading screen. If your app has completed loading and has sent the user to the main content of your app, do not show the ad.
Note
In order to continue loading app assets while the app open ad is being displayed, always load assets in a background thread.
App open ads help you monetize your app's loading screen, when the app first launches and during app switches, but it's important to keep best practices in mind so that your users enjoy using your app. It's best to:
- Show your first app open ad after your users have used your app a few times.
- Show app open ads during times when your users would otherwise be waiting for your app to load.
- If you have a loading screen under the app open ad, and your loading screen completes loading before the ad is dismissed, you may want to dismiss your loading screen from the
OnAppOpenAdClosed
andOnAppOpenAdFailedToShow
events.
🔗 Done! What’s Next?
- Follow our integration guides and implement our Ad Units:
- Read more about Impression level data.
- Project Setup
- Configuring SDK
- Include Android
- Include iOS
- Additional mediation steps
- App-ads.txt🔗