overthesun / simoc-web

This is the web interface to SIMOC
https://ngs.simoc.space/
Other
3 stars 0 forks source link

Google Analytics not working #136

Closed ezio-melotti closed 2 years ago

ezio-melotti commented 2 years ago

Apparently the Google Analytics stopped working, most likely after the VueJS3 upgrade. During the upgrade, the vue-gtag package was updated with the VueJS3-compatible vue-gtag-next, and the way plugins are handled by VueJS3 also changed.

The UA-* tag is still correct (the one that ends with -6 is NGS), so either there's something wrong with the process.env.NODE_ENV var not being set properly, or the way vue-gtag-next is loaded/configured.

ezio-melotti commented 2 years ago

This is now fixed (see #138). The problem was caused by some changes in the API of the vue-gtag-next package (namely they renamed config to property and enabled to isEnabled). While I was at it I updated the code to dynamically determine whether we are on beta or ngs and use the correct tracker id.