beyonk-group / async-script-loader

Asynchronous script loading for SPAs
17 stars 3 forks source link

Loading in <head>, instead the page's body #7

Open mitchellvanw opened 3 years ago

mitchellvanw commented 3 years ago

Hi, I'm considering to use svelte-google-analytics (and subsequently async-script-loader). The one thing that's holding me back is that github#beyonk-adventures/async-script-loader will load scripts into document.body. Google recommends loading GTM inside <head>.

What're your thoughts on this?

antony commented 3 years ago

It's a reasonable point.

I don't see a reason why this couldn't be an option passed to the loader, so you could tell it where to inject the scripts?