How to add clickTag into HTML5 creative converted from swf file with Swiffy?

Recently Google has announced that ads in Doubleclick Digital Marketing ecosystem are going 100% HTML5 (read more here). Starting from June 30, 2016 all Adobe Flash swf files won’t be supported.

If your creative team still uses Adobe Flash to produce advertising material, Swiffy converter will be a reasonable solution.

Main issues with Swiffy html5 files:

  • converted creative by default doesn’t contain clickTag, which basically means that DSP/adserver has no way to replace your landing page url (set on the platform) within the creative
  • DBM will display “You must include at least one click tag in your HTML file. Or, in Google Web Designer, select the DoubleClick environment and use an exit event instead.” error when you will try to upload material converted by Swiffy
  • don’t get fooled that there is no image source files inside creative. Swiffy gives you only single file output, all images are converted to a text (more info here: Data URI scheme)

How to fix Swiffy output file?

Put the following code snippet right before </body> tag in your html Swiffy file.

<script>
 var clickArea = document.getElementById('swiffycontainer'); //Creates all creative clickable
 var clickTag = "http://13.237.137.151"; //clickTag variable which will be replaced by DSP or adserver
 clickArea.onclick = function() { //Function fires clickTag url after clicking area of creative
 window.open(window.clickTag);
 }
</script>

Et voilà. That’s all, adserver/DSP will automatically replace clickTag with your landing page.

Leave a Reply

Your email address will not be published. Required fields are marked *