UI template:HTML5 Banner
Floating ads appear above the content of a webpage automatically after the page is loaded. They may be placed at the center of a screen (pop-up ads) or at the top/bottom of a screen (catfish or sticky ad). The ad closes entirely by clicking the Close button.
Desktop | Tablet | Phone | |||
---|---|---|---|---|---|
Windows | Mac | iOS | Android | iOS | Android |
Chrome, Firefox, Edge, IE10+ | Safari6.2+, Chrome, Firefox; | – | – | – | – |
Standard dimensions, WxH, px: 300х250, 300×300, 550х480
User-initiated (turned off by default)
“X Close” button in the upper right corner of the expanded panel (allows user to collapse the ad)
Banner with all banner assets should be archived as a .zip file. It is recommended to use .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 with the following method.
All used modules should be listed as function parameters. Two and more modules should be comma-separated. In this format, the Player and module may be used.
A simplified example of the globalHTML5Api.init usage for the Floating format is shown below.
Key | Parameters | Properties | Type | Description | ||
---|---|---|---|---|---|---|
resize(options) | – | – | – | globalHTML5Api.resize initialization | ||
options | – | Array | Array of objects with properties. Each object presents the container state (resizeState) | |||
name (required) | String | Object (state) name | ||||
width (required) | String|Number | Banner container width | ||||
height (required) | String|Number | Banner container height | ||||
fixed | – | Object | Object with properties. Describes the container position relatively to browser window | |||
vertical (required) | top, center, bottom | String | The vertical alignment of the container | |||
horizontal (required) | left, center, right | String | The horizontal alignment of the container | |||
onComplete | Function | Callback function running upon completion of globalHTML5Api.init.resize.to(this.name) | ||||
onStart | Function | Callback function running upon starting of globalHTML5Api.init.resize.to(this.name) |
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 | |
close() | – | – | Method to close the banner |
globalHTML5Api.autoClose(timeMS, preventEvent) | – | – | Method for automatic banner closing after a set amount of milliseconds |
timeMS (required) | Number | Amount of milliseconds before the banner closing | |
preventEvent (optional) | Boolean | Prevents sending a tracking event close (banner closing). If the value is false, the event will be sent. Default: false |
In case the creative contains video, see the Video player module page.
Supported file types: .jpg, .png, .gif, .svg
For any questions regarding ad manuals please contact the support manager of your account.