UI template: HTML5 Mobile Banner
The ad format consists of a main panel and an expanded one. The main panel appears on a page load in a content zone that is 100% of a site’s width. An ad container enlarges and the expanded panel appears on a page scroll. The expanded panel may contain video. Video playback starts automatically when the banner reaches a user’s viewport.
Desktop | Tablet | Phone | |||
---|---|---|---|---|---|
Windows | Mac | iOS | Android | iOS | Android |
– | – | ver. 8.0+ | ver. 4.4+ | ver. 8.0+ | ver. 4.4+ |
Portrait device orientation
A default height of a collapsed banner is 1/3 of the maximum expanded banner’s height.
Banner width: the banner container always extends to 100% of screen width.
Landscape device orientation
A default height of a collapsed banner is 1/3 of the maximum expanded banner’s height.
Portrait device orientation
A default height of the expanded banner is equal to the expanded banner’s width (aspect ratio of banner’s sides is 1:1).
Landscape device orientation
The default height of the expanded banner is 80% of the device’s screen height.
User-initiated (off by default).
Additionally, you can check the preview of the creative by copying the link to it and viewing it from your mobile device.
The banner with all banner assets should be archived as a .zip file. It is recommended to use the .zip file with a template.
The HTML file must define all used sources (libraries, images, etc). A recommended file name is body.html.
globalHTML5Api connects automatically, requested in the following way.
All used modules should be listed as function parameters. Two and more modules should be separated by commas. In this format the Player and Extend modules may be used.
A simplified example of the globalHTML5Api usage for the Mobile Extend format is shown below.
Method | Parameters | Type | Description |
---|---|---|---|
create | – | Object | Extend initialization |
expandPercent (optional) | Number | A trigger value calculated in % of the banner’s height. Upon reaching this value the ‘expand’ event is fired and callback functions are passed. Default value is 50%. |
|
minSize (optional) | Number | A minimal size of the expanded panel, in % of the device’s screen height. | |
maxSize (optional) | Number | A maximum size of the expanded panel, in % of the device’s screen height. | |
onExpand (required) | Function | Callback functions running upon reaching the trigger ‘expandPercent’ value. The expanded panel animation starts here. |
|
onCollapse (required) | Function | Callback functions running upon reaching the value that is less than the trigger ‘expandPercent’ value, provided that the ‘expand’ has already been fired. The collapsed panel animation starts here. |
Method | Arguments | Type | Description |
---|---|---|---|
click(URL) | – | – | Method to call the clickthrough. Target URL may be set as a parameter or from the user interface. The URL set in the code has a higher priority than the URL set from the UI, which can lead to a conflict. Therefore, it is mandatory to use only one of the available methods. |
URL (optional) | String | Target URL | |
src(URL) | – | – | Method returns the absolute path to file |
URL (optional) | String | Relative path to file | |
globalHTML5Api.on(‘event’, callback);) | – | – | Function calling upon an event |
event | String | Event ‘positionChange()’ | |
callback(positionData) | Function | callback function |
In case the creative contains video, see the Video player module page.
Supported file types: .jpg, .png, .gif, .svg
CSS files are supported as well.
For any questions regarding ad manuals please contact the support manager of your account.