UI template: HTML5 Mobile Banner
Preview
The ad format is a standard banner with a fixed page position, a specified value of height, and width of 100% of a parent container. Standard height, px: 90, 120.
This ad format may be subject to restrictions imposed by
Google in cooperation with the
Coalition for Better Ads on delivery of ads in Chrome. A list of ad experiences that should be avoided in the ad format according to
Initial Better Ads Standards:
· autoplaying video ad with sound.
Supported platforms
Desktop |
Tablet |
Phone |
Windows |
Mac |
iOS |
Android |
iOS |
Android |
– |
– |
ver. 7.0+ |
ver. 4.4+ |
ver. 7.0+ |
ver. 4.4+ |
Known issues
Creative created with Adobe Edge technology can be non-clickable in a Safari Mobile browser.
Download archive with the template:
Download
Present file structure corresponds the default template only and can be changed by you. The required file in a .zip archive is body.html. All parameters such as dimensions, events, click tracking etc. can be defined in the body.html.
How to work with .zip archive (template)
- Unpack an archive with a creative template.
- For creative preview use the preview page or copy all files to a folder index – banners – banner – body and open a file index.html in a browser using localhost. For that a web server has to be installed (e.g. IIS for Windows, Apache for Mac OS).
Additionally, you can check the preview of the creative by copying the link to it and viewing it from your mobile device.
- Open the file body.html with the text editor and edit the code snippet inside tags <body> </body>.
Provide banner sizes, scripts, etc. within <body> </body> tags. Otherwise, the ad won’t show.
- Edit a file body.js.
- Save and archive all banner assets in .zip (you should archive the files, not the folder that contains the files).
File body.html must be in the root directory of the .zip file.
Asset requirements
ZIP archive
A banner with all banner assets should be archived as a .zip file. Use a .zip file with a template.
HTML file
The HTML file must define all used sources (libraries, images, etc). A recommended file name is body.html.
API connection and usage
globalHTML5Api connects automatically, requested in the following way.
- Expand the globalHTML5Api code
globalHTML5Api.on('load', function(){
/*
YOUR CODE IS HERE
*/
});
globalHTML5Api objects and methods should be defined inside a called function. All used modules should be listed as function parameters. The format may use the Player module. A sample of globalHTML5Api.init usage for the Mobile Flexible format looks the following way.
- Expand the globalHTML5Api.init example code
globalHTML5Api.on('load', function(){
globalHTML5Api.init({
'resize': [
{
'name': 'state-1',
'width': '100%',
'height': '90px'
}
]
});
});
globalHTML5Api.init Parameters
Key |
Properties |
Type |
Description |
resize |
– |
Array |
Array of objects |
name (required) |
String |
Object name. Each object presents a particular container state (resizeState). |
width (required) |
String|Number |
Banner container width |
height (required) |
String|Number |
Banner container height |
globalHTML5Api Methods
Method |
Arguments |
Type |
Desscription |
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 |
Video
In case the creative contains video, see the Video player module page.
Important! Make sure that external references to the files support only secure HTTPS scenarios.
Images
Supported file types: .jpg, .png, .gif, .svg
File size
max 300 KB
Event tracking
- View
- Confirmed view
- Click
Chrome
will limit the resources a display ad can use before the user interacts with the ad by removing heavy creatives from the page. An ad is considered heavy
if the user has not interacted with it (for example, has not tapped or clicked it) and it meets any of the following criteria:
– Uses the main thread for
more than 60 seconds in total
– Uses the main thread for
more than 15 seconds in any 30-second window
– Uses
more than 4 megabytes of network bandwidth
For any questions regarding ad manuals please contact the support manager of your account.
Updated on April 09, 2024