Interstitial

Interstitials are full-screen visuals that appear inside your application.

NEW: SDK version 7.0.0 supports zones. Please note, this release does not currently support cross promotion ad serving. To access our cross promotion features, please use SDK version 6.4.1

1. Load the interstitial

Make sure you add the Tapdaq namespace to the top of your script:

using Tapdaq;

Before displaying an interstitial to the user, please load the interstitial ad as shown below:

AdManager.LoadInterstitial("main_menu");

If you would like to load the interstitial when the application starts, use the TapdaqConfigLoaded listener to guarantee the ad is loaded.

private void OnEnable() {
	TDCallbacks.TapdaqConfigLoaded += OnTapdaqConfigLoaded;
}

private void OnDisable() {
	TDCallbacks.TapdaqConfigLoaded -= OnTapdaqConfigLoaded;
}

private void OnTapdaqConfigLoaded() {
	AdManager.LoadInterstitialWithTag("main_menu");
}

2. Display the interstitial

To display the interstitial we recommend using the AdAvailable listener. To do this, create a callback method and subscribe it to the AdAvailable listener.

private void OnEnable() {
	TDCallbacks.AdAvailable += OnAdAvailable;
}

private void OnDisable() {
	TDCallbacks.AdAvailable -= OnAdAvailable;
}

private void OnAdAvailable(TDAdEvent e) {
	if (e.adType == "INTERSTITIAL" && e.tag == "main_menu") {
		AdManager.ShowInterstitial("main_menu");
	}
}

It is also possible to check the interstitial is loaded before displaying it to the user, as shown below:

if (AdManager.IsInterstitialReady("main_menu")) {
	AdManager.ShowInterstitial("main_menu");
}

Export your application to iOS and Android, then run your application to test the ad displays correctly.

4. Load another interstitial on close

If you wish to load another interstitial after you have shown one, implement one of the following options:

A. Auto Reload all Ads

To auto reload all ads using the same placement tag set the Auto Reload option in Tapdaq Settings, like so: Interstitial - Auto Reload

B. Implement Delegate Event

Add a delegate event for OnAdClosed, then call load within the delegate method like so:

// Subscribe to Tapdaq events
private void OnEnable () {
	TDCallbacks.AdClosed += OnAdClosed;
}

// Unsubscribe from Tapdaq events
private void OnDisable () {
	TDCallbacks.AdClosed -= OnAdClosed;
}

private void OnAdClosed(TDAdEvent e) {
	if (e.IsInterstitialEvent ()) {
		AdManager.LoadInterstitial(e.tag);
	}
}

Need help?

If you are having any problems integrating, feel free to contact us on [email protected] and we will be more than happy to help.

What's next?

Now that you have successfully integrated an interstitial into your app, what would you like to do next?