GroupM Nexus Solutions – programmatic – Specification

FT.manifest({
  "filename": "index.html",
  "width": 300,
  "height": 250,
  "clickTagCount": 1
});

Creatives must have a minimum of one clickTag and a maximum of twenty.

NOTE:The destination URL is not implemented within the creative itself. It is managed at the campaign level within the campaign management interface. Below is an example of a typical manifest. If more than one clickTag is required, modify the clickTagCount parameter accordingly.

There are three primary methods for incorporating clickTags.

1. <ft-default clicktag="1">
  <!-- add content within, will click through to clickTag one -->
</ft-default>

2. myFT.applyClickTag()
<div id="container">
  <!-- all content here will click through to click tag one -->
</div>
<script src="https://cdn.flashtalking.com/frameworks/js/api/v2/10/html5API.js"></script>
<script>
  var container = myFT.$("#container");
  myFT.applyClickTag(container, 1);
</script>

3. myFT.clickTag()
<div id="container">
  <!-- all content here will click through to click tag one -->
</div>
<script src="https://cdn.flashtalking.com/frameworks/js/api/v2/10/html5API.js"></script>
<script>
  var container = myFT.$("#container");
  container.on("click", function() {
    myFT.clickTag(1);
  });
</script>

Each video object in the videos array requires two properties. You are limited to 8 video objects in a single ad.

The available methods for creating in-banner video ads are:

  1. Build an In-Banner Video Ad with Custom Elements .

Custom elements are HTML elements, provided by our HTML5 API, which can be used in your ad just like any normal HTML element.  You place them in the HTML just as you would a <div> or <p>, and can target them with CSS and JavaScript in the same way.

<ft-carousel>;<ft-click>;<ft-default>;<ft-dynamic>;<ft-expand>;<ft-map>;<ft-photo>;<ft-richload>;<ft-slide>;<ft-slide-nav>;<ft-video>;<ft-video-controls>

  • Your manifest should now look like this.Manifest.js with video array

FT.manifest({
„filename”:”index.html”,
„width”:300,
„height”:250,
„clickTagCount”:1,
„videos”:[
{„name”:”video1″, „ref”:”153357/Zoe_Beauty_Perfume”}
]
});

  • Create a new index.html with a call to our HTML5API.

<!DOCTYPE html>
<html>
<head></head>
<body>
<script src=”our-latest-API”></script>
</body>
</html>

  • Add an  <ft-video> element . Index.html with HTML5 API and <ft-default>

<!DOCTYPE html><html>

<head></head>

<body><ft-default clicktag=”1″>

</ft-default><script src=”our-latest-API”></script>

</body></html>

  • Add your <ft-video> element. The name attribute of the custom element must match the name attribute in the manifest.js. Include any video attributes (in this example we include autoplay, muted and controls in order to make the video autoplay with sound off, and display the controls). Index.html with HTML5 API, <ft-default> and <ft-video>

<!DOCTYPE html>

<html><head></head>

<body><ft-default clicktag=”1″>

<ft-video name=”video1″ autoplay muted controls></ft-video>

</ft-default><script src=”our-latest-API”></script>

</body></html>

NOTE: By default, videos do not automatically pause when a click tag is actioned. If this behavior is undesirable for your creative build, override it using the myFT event „clickthrough,” like this:

Index.html with code demonstrating cancel pause on clickthrough

<!DOCTYPE html>
<html>
<head></head>
<body>
<ft-default clicktag=”1″>
<ft-video id=”myVid” name=”video1″ autoplay muted controls></ft-video>
</ft-default>
<script src=”our-latest-API”></script>
<script>
var myVid = myFT.$(„#myVid”);
// Optional event handler that overrides video pause on click through
myFT.on(’clickthrough’, function(){
myVid[0].play();
});
</script>
</body>
</html>

  • Add any other assets (e.g. images, fonts, stylesheets, etc.). Zip up your files, ensuring the index.html and the manifest.js are in the root of the zip.

2. Build an In-Banner VideoAd with JavaScript.

Your manifest.js should now look like this:

FT.manifest({
„filename”:”index.html”,
„width”:300,
„height”:250,
„clickTagCount”:1,
„videos”:[
{„name”:”video1″, „ref”:”153357/Zoe_Beauty_Perfume”}
]
});

  • html with HTML5 API

<!DOCTYPE html><html>

<head></head><body>

<script src=”our-latest-API”></script>

</body></html>

  • Add a container div. This will wrap your other content.

<!DOCTYPE html>
<html>
<head></head>
<body>
<div id=”container”>
</div><script src=”our-latest-API”></script></body>
</html>

  • Add a div element within your container div for the video to be loaded into.

Index.html with HTML5 API and container and videoHolder divs.

<!DOCTYPE html>
<html>
<head></head>
<body>
<div id=”container”>
<div id=”videoHolder”></div>
</div><script src=”our-latest-API”></script>
</body>
</html>

  • Below the HTML5 API call, add a script tag. Within the script tag, create a variable to reference your container element. Index.html with HTML5 API and JavaScript variables.

<!DOCTYPE html><html>

<head></head>

<body>  <div id=”container”>

<div id=”videoHolder”></div>

</div> <script src=”our-latest-API”></script>

<script>  var container = myFT.$(„#container”);

</script></body></html>

  • Within the script tag, the clickTag() methodcan be used in a click handler to action the appropriate click tag.

<script>
var container = myFT.$(„#container”);

container.on(„click”, function() {
myFT.clickTag(1);
});
</script>

  • Use the insertVideo() method to insert an <ft-video> custom element into the 'videoHolder’ div that was created previously. The return value of insertVideo() is a reference to the <ft-video> element which is assigned to a variable (’myVid’) for later use.

<script>
var container = myFT.$(„#container”);
container.on(„click”, function() {
myFT.clickTag(1);
});
var myVid = myFT.insertVideo({
video: „video1”,
parent: videoHolder,
autoplay: true,
controls: true,
muted: true,
width: 300,
height: 250
});
</script>

  • The insertVideo() method takes a video configuration object as an argument. In this example we include autoplay, muted and controls in order to make the video autoplay with sound off, and display the controls.
    Required properties of the configuration object:
      video: Must match the name property of the video object as defined in the manifest.js file.
        parent: DOM Element that the <ft-video> element will be appended to.
    Optional properties:
        autoplay: Determines if the video should autoplay. This defaults to false if not set.
        controls: Determines if the video controls should be shown. This defaults to false if not set.
        muted: Determines if the video should initially be muted. This defaults to false if not set.
        width: Width of the <ft-video> element. Remove to use the native video width.
        height: Height of the<ft-video> element. Remove to use the native video height.

NOTE: By default, videos do not automatically pause when a click tag is actioned. If this behavior is undesirable for your creative build, override it using the myFT event „clickthrough,” like this:

<script>
var container = myFT.$(„#container”);
container.on(„click”, function() {
myFT.clickTag(1);
});
// Optional event handler that overrides video pause on click through
myFT.on(’clickthrough’, function(){
myVid.play();
});
var myVid = myFT.insertVideo({
video: „video1”,
parent: videoHolder,
autoplay: true,
controls: false,
muted: true,
width: 300,
height: 250
});
</script>

  • Your HTML file should now look like this.Index.html with HTML5 API and JavaScript.

<!DOCTYPE html>

<html>

<head></head>

<body><div id=”container”>

<div id=”videoHolder”></div>

</div><script src=”our-latest-API”></script>

<script>

var container = myFT.$(„#container”);

container.on(„click”, function() {

myFT.clickTag(1);

});

var myVid = myFT.insertVideo({

video: „video1”,

parent: videoHolder,

autoplay: true,

controls: false,

muted: true,

width: 300,

height: 250

});

</script>

</body> </html>

  • Add any other assets (images, fonts, stylesheets, etc.). Zip up your files, ensuring the index.html and the manifest.js are in the root of the zip.

Downloadable Sample Files: