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

Matomo issues #421

Open
egpbos opened this issue Dec 19, 2024 · 2 comments
Open

Matomo issues #421

egpbos opened this issue Dec 19, 2024 · 2 comments

Comments

@egpbos
Copy link
Member

egpbos commented Dec 19, 2024

There are currently two issues with our Matomo setup (introduced in #419):

  1. We don't have an opt-out button (this is recommended by Matomo for GDPR compliance). I can't get the code for this to work in Docsify (it is included in the privacy page, but commented out for now).
  2. More importantly: page visits are not properly logged. In particular, direct visits inside one browser session (tab/window/whatever) are logged, but any subsequent page visits within that same session are not. This is probably because Docsify does something "smart", capturing the sub-page clicks, changing the address in the address bar and refreshing the page to contain the content you clicked on, but not actually doing any HTTP requests. The page just changes content through client-side Javascript. Apparently (and not surprisingly) this does not jive with Matomo's logging script.

We could investigate how to fix this inside Docsify, but we should not spend too much effort on this (e.g. writing a Docsify Matomo plugin would not be sustainable for us, but maybe there's an easy trick to make Matomo work with Docsify or Docsify's page update system could be slightly tweaked so that it emulates HTTP requests better...).

Also related to #405: with mkdocs I think we wouldn't have any of these problems, so that would also be a solution.

@egpbos
Copy link
Member Author

egpbos commented Dec 19, 2024

@ewan-escience thoughts? Or @sverhoeven who I think set up the Docsify system originally.

@ewan-escience
Copy link
Member

I suspect problem 2 can be solved by setting the routerMode setting to history (because every path is now after the pound sign in https://guide.esciencecenter.nl/#/). Note that this changes all paths and that all pages are then saved in the user's browser history.

However, when I try this out locally, deep linking does not work anymore, which makes sense, because there are no HTML pages at the paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants