dandi / dandiarchive-legacy

Code for the DANDI Web app
https://dandiarchive.org
Apache License 2.0
9 stars 9 forks source link

Add analytics to vue app #477

Closed satra closed 3 years ago

satra commented 4 years ago

It would be nice to add analytics to the gui.

we can use this tracker: UA-146135810-2

here is a vue package that seems to allow richer integration: https://matteo-gabriele.gitbook.io/vue-gtag/#add-plugin-to-your-application

and here is the standard html method, which as a first pass could be put in the footer:

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

@waxlamp - we should add this. we need to be reporting where people are coming to dandi from. this should not be complicated.