javascript - Can I insert 3rd party marketing tags that use document.write() into Google Tag Manager (GTM)? -


i'm installing 3rd party marketing tags gtm (v2) container. tags real nuisance, making heavy use of document.write. though google tag manager claims support document.write, these tags throw javascript errors when fired. here's example of such tag.

<script src="http://ib.adnxs.com/seg?add=1958353,6039160&t=1" type="text/javascript"> </script> 

this script seg?add=1958353,6039160&t=1 goes on call document.write twice:

document.write('<scr'+'ipt type="text/javascript" src="https://js.b1js.com/tagcontainer.js?id=110386891486949186&type=1"></scr'+'ipt>'); document.write('<scr' + 'ipt src="http://cdn.adnxs.com/ib/async_usersync.js"></scr'+'ipt>'); 

if ask gtm support document.write tag, , set tag fire on pages, i'll error on page load:

uncaught typeerror: cannot read property 'parentnode' of null uncaught #<object> 

if uncheck gtm's "support document.write" tag, i'll warning in console:

failed execute 'write' on 'document': isn't possible write document asynchronously-loaded external script unless explicitly opened.

i've tried deferring tag firing until after dom ready, worked 1 of tags, not one.

i have @ least 3 tags configured use document.write in way, , throw same error when fired. please understand other tags don't rely on document.write work well. thank or suggestions can provide.

not sure if help, try set firing rule gtm.load instead of dom ready.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -