Banner ads
Unity supports traditional banner sizes for mobile and tablet devices. Banners render in a webview environment that includes MRAID support. The following requirements apply to display banner ad formats:
- All HTML markup must reference externally-hosted assets with an absolute URL path that contains
https://
and a domain. Pointing to assets fromfile://
or a relative URL path doesn't work. - The
<iframe>
tag is supported to load HTML resources. Please note that the click function has the following two formatting recommendations when using the<iframe>
tag:- Using standard HTML elements (
<a>
tags) that wrap the content, allowing click events to naturally bubble up through the DOM, or - Using the
mraid.open()
method to leverage the available MRAID interface to enable proper communication with the Unity Ads SDK container.
- Using standard HTML elements (
Banner size and responsiveness
Banner placements are not full screen, but they are responsive to device type and screen size. The Unity Ads SDK provides appropriately sized ads to fit your banner placement, such as:
- 320 x 50 pixels (traditional banner size) for mobile or tablet devices
- 728 x 90 pixels for tablet devices
- 450 x 450 pixels
- 300 x 300 pixels
- 300 x 250 pixels
You do not need to provide a banner placement size in your response. The banner ad request’s format object specifies applicable sizes for each impression opportunity.
Open Measurement
Unity supports Open Measurement (OM) third-party code with your ad content.
To implement OM code in your ad content, include the verification script in the HTML code.
For example:
<a href="https://click-link-with-tracking.com/click?with-click-information"><img src="https://host-url.com/display/ad_image.fig" width="320" height="480"></a><img height="1" width="1" src="https://impression-tracking.com/pixel?id=1234">
<script src=”https://verification.com/omid_verification.js”></script>