Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

document.write() does not work in DTM


Level 1


i have two page load rules in DTM:

  1. Top of page with Sequential Javascript / Third Party Tags
  2. Bottom of page with Sequential Javascript / Third Party Tags

i have added header code before other js and footer code just before </body> in all pages. But on some pages it works great, on other pages document.write() do not work:

loadScriptSync: function(t) { n.write('<script src="' + t + '"></script>') }

Safari always ignores this call of document.write() with no error messages:

n.write('<script src="' + t + '"></script>')

Chrome writes in Console:

["document.write(): ""<script src="http://localhost:4502/....-54084b41577e9caf39000082-staging.js"></script>"removefunction]


Can you advise me something? 

1 Reply


Level 10

If you're still experiencing this error, please contact Customer Care