From September, Flash will no longer be supported by Chrome. Prepare for the shift towards HTML5 by visiting our Flash to HTML5 help page

Check it out!

Standard HTML Ad


A Standard HTML Ad consists of one HTML asset.

Tip: Create banners easier by using Adform‘s HTML5 Studio. It automatically generates the manifest.json and other Adform-related files, as well as enables you building, testing and previewing HTML5 banners effortless.

 

1. The HTML asset should contain a manifest.json file and an HTML file zipped together with images, scripts, and other material.

Note: Please note that manifest.json and the HTML files should be in the root directory of the .zip file, not in the deeper directories. More info about file structure could be found here

 

2. The manifest.json file should define the ad dimension and the HTML file which should be used as a banner source:

{

    "version": "1.0",

    "title": "930x180 standard html", 
    "description": "",  

    "width" : "930", 
    "height": "180", 

    "events": {
        "enabled": 1, 
        "list": { }
    },

    "clicktags": {
        "clickTAG": "http://www.adform.com"
    },

    "source": "930x180.html"
}

3. When producing an HTML banner it is important to implement the clickTAG variable. In other words, to make the banner clickable

4. The HTML file should include the Adfrom DHTML library which enables the banner to receive a clickTAG variable:

<script>
document.write('<script src="'+ (window.API_URL || 'https://s1.adform.net/banners/scripts/rmb/Adform.DHTML.js?bv='+ Math.random()) +'"><\/script>');
</script>

 

5. The clickTAG value, landing visitor to it, can be assigned to the banner by using the JavaScript code:

<script>
    var banner = document.getElementById('banner');
    clickTAGvalue = dhtml.getVar('clickTAG', 'http://www.example.com'); //banner will receive clickTAG value - if not defined, banner will land to example.com
    landingpagetarget = dhtml.getVar('landingPageTarget', '_blank'); //landingPageTarget variable enables to change target from Adform system.

    banner.onclick = function() {
        window.open(clickTAGvalue, landingpagetarget); //when banner is clicked it will open new window directing to clickTAG value
    }
</script>