HTML 5 banner english version

Client is responsible for correct function in all major browsers, mobile versions included.

Banner must be https ready, and all calls must have "protocol relative URL".
Example of wrong call:

<script type="text/javascript" charset="utf-8" src="http://animate.adobe.com/runtime/6.0.0/edge.6.0.0.min.js"></script>

Mixed content must be allowed like this:

<script type="text/javascript" charset="utf-8" src="//animate.adobe.com/runtime/6.0.0/edge.6.0.0.min.js"></script>


Maximum file size for standard HTML5 banner is 100kb.
Banner will be called as an iframe with a GET parameter "click=", value of this parameter will be inserted as a href value.
All anchor targets inside your HTML banner will be set to "_blank"

Following codes are just examples. Code in HTML5 banners vary. Target URL may be generated by a javascript function; it is up to client to ensure the right solution for passing the value of "click" parameter.


Example of solution for banner with anchor tags like <a href ="http://...."></a>

Value of the href attribute href set to href="#"
Landing URL send us along with the banner.

<a href ="#"></a>

Insert following script into your HTML file before tag </body>:

<script type="text/javascript">
(function() {
function getURLParameter(name, url) {
if (!url) url = location.href;
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( url );
return results == null ? null : results[1];
}
var preclickurl = getURLParameter('click')  || '';
var anchors = document.getElementsByTagName("a");
var clickthru = '';
for (i = 0; i < anchors.length; i++) {
    if ( (anchors[i].getAttribute("href") != "") && (anchors[i].getAttribute("href") != "#") ) {
        clickthru = encodeURIComponent(anchors[i].href);
    } else {
        clickthru = "";
    }
    if (anchors[i]) {
        anchors[i].setAttribute('target', '_blank');
        anchors[i].href = preclickurl + clickthru ;
        }
}
})();
</script>

Solution for creatives converted via Swiffy tool

1. According to SPIR standards flash creative has to support clickthru. (more info here)
2. Add following code into your html file right before method call stage.start().

Send us your landing URL along with the creative.

function getURLParameter(name, url) {
if (!url) url = location.href;
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( url );
return results == null ? null : results[1];
}
var preclickurl = encodeURIComponent(getURLParameter('click')  || '');
stage.setFlashVars("clickTarget=_blank&clickthru=" + preclickurl + "&clickTAG=" + preclickurl + "&clickTag=" + preclickurl);


Example of solution for export from Google Web Designer.

If you have one landing URL only, and the whole banner area should be clickable, and wrapper for your banner has id="gwd-ad", you can use following solution:
Do not hardcode Landing URL into your banner via tap area, send us your landing URL along with the banner.
Right before tag </body> in your html file insert following script:

<script type="text/javascript">
    (function() {
     function getURLParameter(name, url) {
if (!url) url = location.href;
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( url );
return results == null ? null : results[1];
}
    var preclickurl = getURLParameter('click')  || '';
    var clickthru = '';
    var stage = document.getElementById("gwd-ad");
    stage.style.cursor = "pointer";
    stage.addEventListener('click', function(event){
        window.open(preclickurl + clickthru, "_blank");
        event.preventDefault();
    });
    })();
</script>


Example of solution for Adobe Edge export

If you have one landing URL only, and the whole banner area should be clickable, you may use following solution:
Send us your landing URL along with the banner.
Right before tag </body> in your html file insert following script:

<script type="text/javascript">
(function() {
function getURLParameter(name, url) {
if (!url) url = location.href;
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( url );
return results == null ? null : results[1];
}
var preclickurl = getURLParameter('click')  || '';
var clickthru = '';
var stage = document.getElementById("Stage");
stage.style.cursor = "pointer";
stage.addEventListener('click', function(event){
    window.open(preclickurl + clickthru, "_blank");
    event.preventDefault();
});
})();
</script>
Hledat
Flash prostředí
Action Script 2 | Action Script 3
English