Interstitial
This article will guide you through all the steps necessary to display an Interstitial ad in your application
Last updated
This article will guide you through all the steps necessary to display an Interstitial ad in your application
Last updated
Interstitial ads are skippable fullscreen ads.
Ensure your application is registered on the Ogury Dashboard. If not, please refer to the Getting Started page before proceeding.
on your asset page in the Ogury Dashboard.
, as you will need it for integration. It is in the form of a UUID, which consists of a 36-character string formatted as follows: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
, where each x
represents a hexadecimal digit.
In the following code samples, this ad unit ID will be represented as xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
.
To load an Interstitial ad, instantiate an OguryInterstitialAd
object and call its load()
method.
OguryInterstitialAd
requires the following parameter:
adUnitID
: the ad unit ID for the Interstitial ad. If you do not have one, please refer to the first step to create it.
If you are developing a mediation adapter, you must pass an additional parameter, OguryMediation
which should be instantiated with:
name
: the name of the mediation.
version
: the version of the mediation SDK.
You can monitor the lifecycle of your Interstitial ad by implementing the OguryInterstitialAdDelegate
protocol. This delegate provides real-time updates on key events, such as successful ad loading, display or errors.
To use it, set your class as the delegate of OguryInterstitialAd
and implement the necessary methods. This ensures timely notifications, allowing you to manage the ad experience effectively.
If the interstitialAd:didFailWithError:
callback is triggered, refer to the Error handling section below for detailed information on troubleshooting.
To display a loaded Interstitial ad, invoke the show()
method on the instantiated OguryInterstitialAd
object.
The show()
method requires the following parameter:
A reference to the ViewController
where the Interstitial ad will be presented.
Always verify that the ad is loaded before invoking the show()
method, particularly if you are not calling it from the interstitialAdDidLoad
callback.
After registering your app, it may take up to 15 minutes before ads are available.
Ogury exclusively serves ads to users who have provided their consent. Before conducting any tests, it is essential to ensure that your implementation complies with applicable privacy regulations. For more information on the regulations supported by Ogury, please visit the Privacy compliance page.
Since our algorithm uses personalized targeting, you may not receive ads during testing. To obtain test ads, you can append _test
to your Interstitial ad unit ID in the code, for example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_test
.
For further details on test mode and enabling debug logs, please refer to the Test your implementation page.
If you are unable to load or display any Interstitial ads, we recommend logging callbacks from the OguryInterstitialAdDelegate
to monitor the ad's lifecycle, especially the interstitial interstitialAd:didFailWithError:
callback. This method provides an OguryAdError
instance containing important error details:
type
: indicates the error type through the OguryAdErrorType
enum, which distinguishes between loading errors (OguryAdErrorTypeLoad
) and showing errors (OguryAdErrorTypeShow
).
code
: An integer that identifies the specific error. The enums OguryLoadErrorCode
and OguryShowErrorCode
define potential error codes that may occur during loading or showing ads. Further details on these enums are provided in the tables below.
localizedDescription
: A descriptive message that provides additional context about the error.
You can utilize these details to diagnose the issue and take appropriate action to resolve it.
Enum value | Description |
---|---|
| The load could not proceed because the SDK appears to have not been started. |
| The load could not proceed because the SDK is not properly initialized. |
| The load could not proceed because there is no active Internet connection. |
| The load could not proceed due to an invalid SDK configuration. |
| The load could not proceed because ads are disabled; the user’s country is not yet available for advertising. |
| The load could not proceed because ads are disabled; the user has denied consent for advertising. |
| The load could not proceed because ads are disabled; the user consent is missing or has not been provided. |
| The load could not proceed because ads are disabled for an unspecified reason. |
| The load failed because the ad request encountered an error, and the server returned an unexpected response. |
| No ad is currently available for this placement (no fill). |
| The ad could not be loaded due to a failure in parsing. |
| The ad could not be loaded due to a failure in ad precaching. |
| The ad could not be loaded as precaching exceeded the time limit and timed out. |
Enum value | Description |
---|---|
| The ad could not be displayed because the SDK appears to have not been started. |
| The ad could not be displayed because the SDK is not properly initialized. |
| The ad could not be displayed because there is no active Internet connection. |
| The ad could not be displayed due to an invalid SDK configuration. |
| The ad could not be displayed because ads are disabled; the user’s country is not yet available for advertising. |
| The ad could not be displayed because ads are disabled; the user has denied consent for advertising. |
| The ad could not be displayed because ads are disabled; the user consent is missing or has not been provided. |
| The ad could not be displayed because ads are disabled for an unspecified reason. |
| The ad could not be displayed because the retention time of the loaded ad has expired. |
| No ad has been loaded. |
| The ad could not be displayed because the application was running in the background. |
| The ad could not be displayed because another ad is currently being displayed. |
| The ad could not be displayed because the WebView was terminated by the system, resulting in the ad being unloaded due to high resource consumption by the application. |
| The ad could not be displayed because a ViewController is currently being presented, preventing the ad from displaying. |