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 Matomo analytics #170

Merged
merged 3 commits into from
Dec 18, 2024
Merged

add Matomo analytics #170

merged 3 commits into from
Dec 18, 2024

Conversation

egpbos
Copy link
Contributor

@egpbos egpbos commented Dec 17, 2024

Fixes #97.

Changes proposed in this pull request:

Notes for reviewers:

  • I did not add the privacy policy yet, so please don't merge yet! I opened the PR to be able to test the build on Netlify.
  • Ready for review!

Copy link

netlify bot commented Dec 17, 2024

Deploy Preview for everse-rsqkit-testing ready!

Name Link
🔨 Latest commit db763cc
🔍 Latest deploy log https://app.netlify.com/sites/everse-rsqkit-testing/deploys/67618efc30c9490008775b47
😎 Deploy Preview https://deploy-preview-170--everse-rsqkit-testing.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@egpbos
Copy link
Contributor Author

egpbos commented Dec 17, 2024

The Matomo tag does not show up in the Netlify build. This is because apparently it does not build in Jekyll "production mode". The analytics tags are disabled outside of production mode in ETT. I tested locally, and there it does work.

Will now continue with the privacy policy.

@egpbos
Copy link
Contributor Author

egpbos commented Dec 17, 2024

The following page lists 12 steps to be taken for a cookieless GDPR compliant site: https://matomo.org/faq/new-to-piwik/how-do-i-use-matomo-analytics-without-consent-or-cookie-banner/

I think we only strictly need to do step 1, which is to add a single line of Javascript that disables cookies, and step 12, adding a privacy policy (that can be copied from the main EVERSE site).

In addition, a "recommended" step is to provide a Matomo opt-out button (step 11 in the list). I think the main EVERSE website also tried to do that, but on my browser I cannot actually find it anywhere. @graeme-a-stewart is that expected?

The other steps should be configured in the NLeSC Matomo instance already, because it was setup with GDPR compliance.

@egpbos
Copy link
Contributor Author

egpbos commented Dec 17, 2024

I tried to first do a PR to ETT for the cookie disabling line: ELIXIR-Belgium/elixir-toolkit-theme#314

If that goes through, we have to add in this PR a config.yml line to turn the Matomo cookies off. However, it may be a while before the ETT feature is released, so I will now also add a quick workaround in this PR that we can easily remove later.

The head.html file was copied from the current ETT version (3.2.0). Hopefully, ETT will adopt the PR to disable Matomo cookies (ELIXIR-Belgium/elixir-toolkit-theme#314). When they do, the head.html file in this repo can be removed again and we can simply configure the disabling of Matomo cookies via _config.yml.

This commit also pins the ETT version to 3.2.0 to make sure we update it manually later.
The privacy page text is adapted from the EVERSE main site.

I took inspiration from the RDMkit footer which has a bit more links, otherwise the privacy page link would be so lonely (it looks a bit odd).
@egpbos
Copy link
Contributor Author

egpbos commented Dec 17, 2024

Ready for review! As noted above, Matomo doesn't actually work on Netlify, so you'll have to build on your laptop to test if you like. I also did so, and it is working for me, so you can also trust me on that and see how that works out ;)

@egpbos egpbos requested review from anenadic and jmaassen December 17, 2024 14:48
@egpbos
Copy link
Contributor Author

egpbos commented Dec 17, 2024

@graeme-a-stewart: I modified the privacy text slightly. Matomo does still create cookies, but the important part is that no personally identifiable info is included in them (see the "Essential blabla" section here: https://matomo.org/faq/general/faq_157). Doesn't really matter much for privacy purposes, I think, but just a minor edit for completeness.

@anenadic anenadic merged commit 69ddf18 into main Dec 18, 2024
8 checks passed
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

Successfully merging this pull request may close these issues.

Add analytics
2 participants