Creatives
Creative billing


Preview

An ad format for tablets and smartphones with a parallax effect that is initiated by scrolling a page. An ad placement adjusts to the full height of the viewport while scrolling. A creative may contain video. It is highly recommended to test prepared creatives on real devices.

Supported platforms

Desktop Tablet Phone
Windows Mac iOS Android iOS Android
ver. 8.0+ ver. 4.4+ ver. 8.0+ ver. 4.4+

Known issues

  1. Autoplay is not available on iOS 9 and lower.
  2. Autoplay on iOS 10+ and Android is available only with sound off.
  3. For the correct view of a creative on iOS devices, the block about which the clip rect property is triggered must not contain any elements with absolute positioning. Instead, it is recommended to use fixed positioning.

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 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

Banner with all banner assets should be archived as a .zip file. Use the .zip file with a template.

HTML file (required name is body.html)

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 above-given code snippet shows how to include the Parallax and Player. If you need to connect several modules, indicate them by a comma.

JS code for the Mobile Parallax Fullscreen format looks the following way:

Expand the JavaScript example code for the Mobile Parallax Fullscreen
globalHTML5Api.on('load', function (listener, Player) {
	var name = globalHTML5Api.name();
	if (name !== "content") {
		var player = Player.create({
			'src': 'video.mp4',
			'container': document.getElementById('player')
		  });
		  globalHTML5Api.init({
			resize: [
			  {
				name: "state-1",
				width: "100%",
				height: "100vh",
				parallax: true,
			  }
			]
		  });
		  globalHTML5Api.panels.add("top", {
			visible: true,
			src: globalHTML5Api.src("top.html")
		  });
		  globalHTML5Api.panels.add("bottom", {
			visible: true,
			src: globalHTML5Api.src("bottom.html")
		  });
		  globalHTML5Api.panels.add("content", {
			  visible: true,
			  src: globalHTML5Api.src(),
		  });
		  var paused = true;
		  globalHTML5Api.on("positionChange", function(position){
			if (paused && position.inViewPercent >= 50) {
			  player.play();
			  paused = false;
			} else if (!paused && position.inViewPercent < 50){
			  player.pause();
			  paused = true;
			}
		  });
		  document.body.onclick = function (event) {
			listener.Listener.prevent(event);
			globalHTML5Api.click();
		  }
	} else {
		document.body.style.display = "none";
		globalHTML5Api.init({
			resize: [
			  {
				name: "state-1",
				width: "100%",
				height: "100vh",
				css: {zIndex: -1}
			  }
			]
		  });
	}
});

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 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

Video

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

Images

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

Event tracking

  • View
  • Confirmed view
  • Click
  • Play
  • Pause
  • Resume
  • Sound on
  • Sound off
  • Progress (firstQuartile, midpoint, thirdQuartile, complete)
For any questions regarding ad manuals please contact the support manager of your account.
Updated on April 09, 2024