DTM DoubleClick Tags




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>');



<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>


<!-- 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 + '?";


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!

Accepted Solutions (1)

Accepted Solutions (1)




Hey David,

When Dan sent this to you, it probably wasn't entirely clear what your requirements were. Many clients simply copy and paste the DoubleClick code they get from their agencies into the JavaScript/Third Party Tags section of a Page Load or Event Based rule, and they're done. It sounded like one of your requirements was to avoid inline HTML, and instead have the DoubleClick code added in a separate JS file?

Might be better if you email me directly, so we can better understand what you're trying to accomplish and what your constraints / requirements are for these types of tags. It's easy to add them to DTM, but if you require a specific method of inserting the code to your pages, there might be one or two quick other steps involved. Let me know.

Answers (0)