Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for different analytics solutions #1065

Closed
jacobwod opened this issue Apr 27, 2022 · 0 comments · Fixed by #1066
Closed

Add support for different analytics solutions #1065

jacobwod opened this issue Apr 27, 2022 · 0 comments · Fixed by #1066
Assignees
Labels
module:client/core Core functionality (not a plugin) new feature Request for adding/changing functionality
Milestone

Comments

@jacobwod
Copy link
Member

jacobwod commented Apr 27, 2022

Documentation

The API

In addition to the typical page view, the following custom events are being tracked:

  • mapLoaded: when a specific map is loaded
  • pluginShown: when a plugin's window becomes visible
  • layerShown: when a layer changes visibility to true
  • spatialSearchPerformed: when a spatial search is performed
  • textualSearchPerformed: when a text search is performed

Example setup in Plausible

In your Plausible installation, ensure to add the previously stated event names as Goals:
Skärmavbild 2022-05-03 kl  15 00 36

This will result in a nice breakdown in the UI. The example below illustrates which plugins are most popular in a certain setup:
Skärmavbild 2022-05-03 kl  15 01 17

Original issue

Currently many organisations that wish to collect statistics about their Hajk usage do it by adding tracking snippets to the static HTML file when deploying. This works but adds a step to the deployment step and wouldn't work at all in a CI/CD pipeline.

I propose a different solution that would allow for better integration and offer even more possibilities.

The idea is that we integrate one or more different (open source) tracking solutions and allow map admins to control whether they're active using Admin UI.

I will start by adding support for Plausible (https://plausible.io) which is open source, lightweight and allows for self hosting. It is easy to setup due to ready Docker compose file. In addition, the plausible-tracker package will allow us to import it programatically - no need to put <script .... /> in our index.html!

@jacobwod jacobwod added module:client/core Core functionality (not a plugin) new feature Request for adding/changing functionality labels Apr 27, 2022
@jacobwod jacobwod added this to the 3.x milestone Apr 27, 2022
@jacobwod jacobwod self-assigned this Apr 27, 2022
@Hallbergs Hallbergs linked a pull request Apr 29, 2022 that will close this issue
@Hallbergs Hallbergs modified the milestones: 3.x, 3.10 Apr 29, 2022
jacobwod added a commit that referenced this issue May 3, 2022
jacobwod added a commit that referenced this issue May 6, 2022
…arate handling as it's not part of the BaseWindow/DialogWindow group of plugins.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:client/core Core functionality (not a plugin) new feature Request for adding/changing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants