Thumbnail
This article will go through all the steps required to display a Thumbnail Ad in your application.
Last updated
Was this helpful?
This article will go through all the steps required to display a Thumbnail Ad in your application.
Last updated
Was this helpful?
Thumbnail ads are small rectangle ads that are displayed as overlays to your application content. They are closable and draggable by the user, and can be used to (i) monetize your application through new incremental inventories and (ii) push cross-promotion campaigns.
Unlike other ad formats, there is no out-of-the-box equivalent for Thumbnail ads in Google Ad Manager mediation. To integrate them, the Ogury SDK leverages Google Mobile Ads custom events, presenting Thumbnail ads as banners within the mediation.
You must create a dedicated banner ad unit and yield group in Google Ad Manager specifically for Thumbnail ads. Failing to do so could result in undesirable effects, such as blank banners.
However, you can configure it so that a Thumbnail ad unit is called first, and if not filled, a Banner ad unit is called as a fallback. See an example here.
Ensure your application is registered on the Ogury Dashboard. If not, please refer to the 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.
Access your .
Navigate to the list of Ad units and click on the New ad unit button.
Configure the ad unit as following:
Name: enter a name for the ad unit (e.g., Thumbnail Ad).
Code: set a unique code for the integration.
Size Mode: select Fixed size.
Sizes: Choose the various sizes of Thumbnail Ads you plan to use in your app. We recommend using a size of 200x200 to enhance the readability of the Thumbnail ad content
Refresh Rate: Select No refresh, to prevent Thumbnail ads from appearing in front of users every few seconds.
The following constraints apply the Size you can choose:
width and height must be greater than or equal to 45dp.
longest side, either width and height, must be greater than or equal to 80dp.
In order to display Ogury Thumbnail ads through Google Ad Manager mediation, you need to configure a Custom Event for Ogury within a dedicated yield group.
In your GAM dashboard, navigate to Delivery > Yield groups from the left menu.
Click on Delivery > Yield groups in the left-menu of your Google Ad Manager dashboard.
Click on New yield group.
Configure the details of the yield group as follows:
Name: Enter a name for the yield group (e.g., Thumbnail Ad iOS).
Status: Set to Active.
Ad Format: Select Banner.
Inventory Type: Choose Mobile app.
Scroll down to the Targeting section.
Expand the Inventory size section.
Click the checkbox next to this size to select it.
Expand the Inventory section.
Click the arrow next to Ad units.
Search for the ad units where you want to display a Thumbnail ad.
Click the check mark to include them in the targeting.
Scroll down to the Yield partners section at the bottom of the page.
Click on Add yield partner.
Select Ogury from the Yield Partner dropdown menu.
In the New yield partner pop-up, choose Custom Event as the Integration type and enter the CPM you agreed upon with your Ogury Account Manager as the Default CPM.
Under Additional yield partner details, set the Label to match your ad unit name in the Ogury dashboard (e.g., Ogury). This helps ensure that your settings are consistent across both Ogury and GAM.
Configure the Class Name and Parameter as follows:
Class name:
Parameter:
Click on SAVE.
To manage a Thumbnail ad through Google Ad Manager mediation, Ogury provides a dedicated API that simplifies the integration process.
To initialize the Ogury SDK, simply call the Ogury.start()
method.
Though optional, the StartCompletionBlock
is recommended. It provides callbacks for successful initialization or errors. If initialization fails, the listener returns an OguryError
with an error code
and localizedDescription
, helping you troubleshoot. The possible errors are defined in the OguryStartErrorCode
enum for easy reference.
ModuleMissing
The SDK could not be started because a required SDK module is missing.
ModuleFailedToStart
The SDK could not be started because one of the required SDK modules failed to start.
To load a Thumbnail ad, instantiate an OguryThumbnailAdForGoogleMobileAds
object and call its load()
method.
OguryThumbnailAdForGoogleMobileAds
requires the following parameter:
adUnitID
: the Google Ad Manager ad unit ID for the Thumbnail ad.
You can monitor the lifecycle of your Thumbnail ad by implementing the OguryThumbnailAdDelegate
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 OguryThumbnailAdForGoogleMobileAds
and implement the necessary methods. This ensures timely notifications, allowing you to manage the ad experience effectively.
To display an loaded Thumbnail ad, invoke the show()
method on the instantiated OguryThumbnailAdForGoogleMobileAds
object.
Since our algorithm uses personalized targeting, you may not receive ads during testing. To obtain test ads, you can append _test
to your Thumbnail ad unit ID in your yield group, for example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_test
.
To adjust the size of a Thumbnail Ad, use the load()
method with maxWidth
and maxHeight
parameters:
Constraints:
maxWidth
and maxHeight
cannot exceed the device’s screen size.
Thumbnail ads remain visible while users navigate between ViewControllers in your application.
By default, a Thumbnail ad is shown in a ViewController only if its bundle identifier matches the main bundle of the application. However, you can customize these default settings using whitelists and blacklists.
You can expand the list of whitelisted bundles where Thumbnail ads can be displayed and remain on-screen. This is particularly useful if your app includes ViewControllers provided by a library, such as a game engine. In this case, you will need to whitelist the associated bundle.
To whitelist bundles, call the setWhitelistBundleIdentifiers
method:
To prevent Thumbnail ads from being displayed in specific ViewControllers, use the setBlacklistViewControllers
method:
When a user navigates to a ViewController that is neither in the whitelisted bundles nor explicitly blacklisted, the Thumbnail ad will be hidden and paused. It will reappear when the user returns to a permitted ViewController.
If you are unable to load or display any Thumbnail ads, we recommend logging callbacks from the OgurythumbnailAdDelegate
to monitor the ad's lifecycle, especially the thumbnailAd:didFailWithError
callback. This method provides an 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.
Locate the size you selected in .
The start()
method requires the Ogury asset key associated with your app. If you have not an asset key yet, please refer to the page to create one.
By default, the ad loads with a maximum size of 180x180 . If needed, you can customize the maximum size by following the guidelines provided in section.
If the thumbnailAd:didFailWithError
callback is triggered, refer to the section below for detailed information on troubleshooting.
By default, Thumbnail ad is aligned to the bottom-right corner, maintaining a margin of 20 from the right edge and 150 from the bottom.
Additionally, a Thumbnail ad is shown in a ViewController only if its bundle identifier matches the main bundle of the application. For details on how to customize these default settings using whitelists and blacklists, please see the section
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 page.
For further details on test mode and enabling debug logs, please refer to the page.
The maxWidth
and maxHeight
parameters specify the maximum dimensions, in , that the Thumbnail ad will occupy on the screen.
For optimal readability and ad display quality, we recommend setting maxWidth = 180
and maxHeight = 180
. For instance, if you set these values and the Ogury SDK decides to show a 16:9 video ad, the Thumbnail ad will resize to 180x101 to maintain the 16:9 ratio.
Both maxWidth
and maxHeight
must be at least 101 .
The longest side, either maxWidth
or maxHeight
, must be at least 180 .