zonemaster-gui icon indicating copy to clipboard operation
zonemaster-gui copied to clipboard

Support for analytics in configuration

Open mattias-p opened this issue 3 years ago • 3 comments

It should be possible in the configuration (#219) to add a custom block of HTML near the foot of every page. This would give us an easy way to use analytics tools that don't disappear when you reinstall or upgrade Zonemaster GUI. That way we could add something like Goat Counter (a more privacy minded alternative to Google Analytics) to zonemaster.net so we can get a better picture of how it's being used.

mattias-p avatar Apr 23 '21 09:04 mattias-p

Since the index.html page is the only html page loaded (Single Page Application), you only need to put the code once.

pamasse avatar Jun 02 '21 19:06 pamasse

Hello @pamasse! Nice to see you around :)

But index.html is overwritten when you reinstall Zonemaster GUI or upgrade it to a newer version, and then you have to update it again, right?

mattias-p avatar Jun 03 '21 10:06 mattias-p

Yes, a technical solution will be to supercharge the starting script with a "user configuration loading script". This script will inject the javascript and HTML code associated with the analytical solution.

Another solution could be to implement a generic solution such as https://github.com/angulartics/angulartics2, and pre-configure the library with specific metrics such as, how many people launch a test, how many read the FAQ pages, how many visitors change the language, etc. It more time expensive.

pamasse avatar Jun 03 '21 11:06 pamasse