Hacker News new | ask | show | jobs
by ashray 5002 days ago
Question for your JS folks: How are they going to handle document.write calls in third party or even 1st party tags ? Those are blocking by nature and trying to load them up asynchronously will ruin the page. I know there are a few document.write overrides but I'm interested in seeing how they would approach this :)
2 comments

Good question. Google Tag Manager is about improving marketing and tracking tag/pixel performance. These scripts shouldn't do document.write too much.

We don't recommend putting tags in Google Tag Manager that manipulate on-screen elements due to the asynchronous behaviour.

I'm the founder of UberTags, which is a similar solution. We automatically transform doc.writes to appends to handle async. I'm assuming GTM does something similar.