MatteoGabriele / vue-gtag

Global Site Tag plugin for Vue (gtag.js)
https://matteo-gabriele.gitbook.io/vue-gtag/
MIT License
864 stars 64 forks source link

Load new tag and initialize #2

Closed MatteoGabriele closed 5 years ago

MatteoGabriele commented 5 years ago

needs to implement the current setup, programmatically. copy code from vue-analytics

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=__domain_code__"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '__domain_code__');
</script>
MatteoGabriele commented 5 years ago

see https://github.com/MatteoGabriele/vue-gtag/commit/c6a7b3ac91d800fccc41f33164bb4f812d246964