Need to implement a script tag but can't locate a tag type for this?

Hi, Busy trying to implement a tag like below but can't locate a tag type for implementing. Only Scripts src is allowed but I need to insert javascript code for the below. Any ideas on how to achieve this? <script>(function(a){var d=document,c=d.createElement("script");c.async=!0,c.defer=!0,c.src=a,d.getElementsByTagName("head")[0].appendChild(c)})((iatDev=(window.location.href.indexOf("iatDev=1")>-1||document.cookie.indexOf("iatDev=1")>-1),"//"+(window.location.protocol=="http:"&&!iatDev?"h":"")+"j.flxpxl.com/111111.js?r="+Math.random()*1e16+"&m=992&a=111111"+(iatDev?"&d=1":"")))</script>
2 REPLIES 2
Highlighted

Need to implement a script tag but can't locate a tag type for this?

Employee Emeritus
Hey Grant, Good question. Given the number of variations this tag will load (secure dev, non secure dev, non secure production, secure production, etc) I would suggest creating a Tealium Custom Container Tag for this. Add a Tealium Custom Container Tag Save the profile so it pulls in the tag template Open the tag template for the new Custom Container tag just added Open the Tag Configuration Section Open the Advanced Settings section at the bottom of the tag configs Click the "Edit Templates" button at the bottom of the Advanced Settings Replace lines 113 - 120 with this: /* Start Libloader Function Call */ /* Un-comment the single-line JavaScript comments ("//") to use Libloader. */ utag.ut.libloader2({src: (iatDev = (window.location.href.indexOf("iatDev=1") > -1 || document.cookie.indexOf("iatDev=1") > -1), "//" + (window.location.protocol == "http:" && !iatDev ? "h" : "") + "j.flxpxl.com/111111.js?r=" + Math.random() * 1e16 + "&m=992&a=111111" + (iatDev ? "&d=1" : "")), cb: u.myCallback}); /* End Libloader Function Call */
Highlighted

Need to implement a script tag but can't locate a tag type for this?

Tealium Employee
I agree the Custom Container is the way to go.. It may be easier to just paste in your code as-is (instead of modifying it for the libloader function.) Of course, remove the HTML part (the "script" begin and end) so only the JS part is in the template. Sample code to paste in the Tealium Custom Container tag: (function(a){var d=document,c=d.createElement("script");c.async=!0,c.defer=!0,c.src=a,d.getElementsByTagName("head")[0].appendChild(c)})((iatDev=(window.location.href.indexOf("iatDev=1")>-1||document.cookie.indexOf("iatDev=1")>-1),"//"+(window.location.protocol=="http:"&&!iatDev?"h":"")+"j.flxpxl.com/111111.js?r="+Math.random()*1e16+"&m=992&a=111111"+(iatDev?"&d=1":"")))