Hello,
Recently, I placed a DoubleClick Floodlight tag in DTM and it wouldn't fire off after it has been approved.
I was told that the 3rd party code was implemented incorrectly.
Here's what support said:
Concerning the issue of how to add scripts as external files, you do need to specific the script as JavaScript, not HTML (either sequential or non-sequential, with non-sequential the typical format used).
In the '3rd party' code current added you have:
<script type="text/javascript">
var axel = Math.random() + "";
var a = axel * 10000000000000;
document.write('<iframe src="http://2599445.fls.doubleclick.net/activityi;src=2599445;type=uocom193;cat=3rdda308;ord=1;num=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>');
</script>
<noscript>
<iframe src="http://2599445.fls.doubleclick.net/activityi;src=2599445;type=uocom193;cat=3rdda308;ord=1;num=1?" width="1" height="1" frameborder="0" style="display:none"></iframe>
</noscript>
<!-- End of DoubleClick Floodlight Tag: Please do not remove -->
This should be re-written to remove the document.write (and also any 'script tags) and add the iframe through a 'appendChild' call to the DOM, such as:
var axel = Math.random() + "";
var a = axel * 10000000000000;
var el = document.createElement("script");
el.src = "//2599445.fls.doubleclick.net/activityi;src=2599445;type=uocom193;cat=3rdda308;ord=1;num=' + a + '?";
document.getElementsByTagName("body")[0].appendChild(el);
Is that right? Do i really need to implement the code as suggested? I'm sure there's an easier way out there. Please help! Thanks!