Creatives
Creative billing


Preview

An ad format with a parallax effect. It is initiated by scrolling and uses a part of the background. Usually, the banner occupies 100% of a banner’s container width on a web page. Available for both desktop and mobile devices.

Supported platforms

Desktop Tablet Phone
Windows Mac iOS Android iOS Android
Chrome, Firefox Safari7.1+, Chrome, Firefox ver. 8.0+ ver. 4.4+ ver. 8.0+ ver. 4.4+

Download archive with the template:

Download

How to work with .zip archive (template)

  1. Unpack an archive with a creative template.
  2. 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).
  3. Additionally, you can check the preview of the creative by copying the link to it and viewing it from your mobile device.

  4. Open the file body.html with the text editor and edit the code snippet inside tags <body> </body>.
  1. Edit a file body.js.
  2. Save and archive all banner assets in .zip (you should archive the files, not the folder that contains the files).

Asset requirements

ZIP archive

The banner with all banner assets should be archived as a .zip file. Use the .zip file with the template. The example is implemented for desktop and mobile devices.

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 the following way:

Expand the globalHTML5Api code
globalHTML5Api.on('load', function(listener){
    /*
        YOUR CODE IS HERE
    */
});

globalHTML5Api objects and methods should be defined inside a requested function.

All used modules should be listed as function parameters. Two and more modules should be separated by commas. The above given code snippet shows how to include the Parallax module.

JS code for the Parallax format looks like this:

Expand JavaScript sample code
globalHTML5Api.on("load", function (listener) {
  globalHTML5Api.init({
    resize: [{
      name: "state-1",
      width: "100%",
      height: "30w",
      parallax: true
    }],
  });
  globalHTML5Api.panels.add("content", {
    src: globalHTML5Api.src("content.html"),
    visible: true
  });
  document.body.onclick = function(event){
    listener.Listener.prevent(event);
    globalHTML5Api.click();
  }
});

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. In case height is set as parent.innerHeight, it may be reduced using a multiplier (parent.innerHeight*number)
parallax (required) Boolean ‘true’ if the banner use parallax effect, ‘false’ if it doesn’t

Module Panels

This module adds banner’s panels to the web page.

Properties of module Panels

Method Parameters Properties Type Description
add(name, options) Method to add the panel
name String Name of the added panel
options visible Boolean default=“false”; Panel will be rendered as visible on the page
src String Path to the file used as a panel; globalHTML5Api.src() when empty returns the path of a current file

globalHTML5Api methods

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

Video

In case the creative contains video, follow the  Video player module  page.

Images

Supported file types: .jpg, .png, .gif, .svg

Event tracking

  • View
  • Confirmed view
  • Click
For any questions regarding ad manuals please contact the support manager of your account.
Updated on April 09, 2024