icssc / Zotistics-beta-23

Zotistics is UCI's premier grade distribution analysis tool!
https://beta.zotistics.com
MIT License
3 stars 8 forks source link

Add Google Analytics #48

Closed ChaseC99 closed 2 years ago

ChaseC99 commented 2 years ago

Please add this to your <head> section of your HTML.

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

  gtag('config', 'G-J3YZBMRGP8');
</script>

Or if you want to have more specific analytics, you can use the your site tag (G-J3YZBMRGP8) with the react-ga4 library. Here's an example of how AntAlmanac did it.

@alexanderl19 you should have access to the Google Analytics account. Let me know if you have any issues.

alexanderl19 commented 2 years ago

https://developers.google.com/analytics/devguides/collection/analyticsjs#alternative_async_tag

https://caniuse.com/script-async