Can i fire a floodlight tag from a html5 banner in DoubleClick studio?

497 Views Asked by At

A client has asked me to add a floodlight tag to a html5 banner ad when the exit is clicked. Its easy to do via Javascript but I'm worried it might be blocked when published. I've asked DoubleClick and they've advised the floodlight should be added via the Tracking Tool. My publisher doesnt have a clue though and have asked me to add it to the javascript.

If I add something like below, will it work in a html5 Banner?

<head>
<script type="text/javascript" id="DoubleClickFloodlightTag">
//<![CDATA[
function FLOOD1(type, cat, u1) {
        var axel = Math.random()+"";
        var a = axel * 10000000000000000;
        var flDiv=document.body.appendChild(document.createElement("div"));
        flDiv.setAttribute("id","DCLK_FLDiv1");
        flDiv.style.position="absolute";
        flDiv.style.top="0";
        flDiv.style.left="0";
        flDiv.style.width="1px";
        flDiv.style.height="1px";
        flDiv.style.display="none";
        flDiv.innerHTML='<iframe id="DCLK_FLIframe1" src="http://12345678.fls.doubleclick.net/activityi;src=12345678;type=' + type + ';cat=' + cat + ';u1=' + u1 + ';ord=' + a + '?" width="1" height="1" frameborder="0"><\/iframe>';
}
//]]>
</script>
</head>
<body>
<!-- This is an example of a "onclick" call on a anchor tag -->
 <a href="http://address_of_page_to_load_or_file_to_download" onclick="FLOOD1('testtype', 'testcat', 'testu1');" target="_blank">Click here to test the tag</a>
</body>
1

There are 1 best solutions below

0
On

You should fire the Floodlight tag in the landing page and not onclick.