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 tracking to genetics app #4

Merged
merged 4 commits into from
Jul 5, 2023
Merged

Conversation

alepev
Copy link

@alepev alepev commented Jun 8, 2023

@alepev alepev changed the title Add matomo tracking Add matomo tracking to genetics app Jun 8, 2023
@alepev alepev marked this pull request as ready for review June 13, 2023 13:14
@alepev alepev requested a review from fedde-s June 13, 2023 13:14
@alepev alepev self-assigned this Jun 13, 2023
@alepev
Copy link
Author

alepev commented Jun 14, 2023

@RobinM-code (and others) see changes in last commit + related commit in otg-automation. this doesn't seem to work, i.e. I can install Matomo but it doesn't seem to track user activity. I tried several variations without success.

@alepev
Copy link
Author

alepev commented Jun 14, 2023

I just pushed some changes (thanks @fedde-s) to use string replacement to replace the Matomo placeholder value with the URL provided by the user, only if Matomo is enabled; the string replacement takes place in the docker-compose, so it won't be possible to test Matomo with yarn unless one adds the desired Matomo URL to init_matomo.js manually. See also last commits to otg-automation PR

@fedde-s
Copy link
Member

fedde-s commented Jun 14, 2023

see changes in last commit […] this doesn't seem to work

We've since solved it in a different way, but for context on why I expect it didn't work:
import statements in the files in src/ are parsed during transpilation/bundling. matomo_init.js Is in public/ and kept as an unprocessed, statically served file. By the time the browser runs it, the src/ folder does not exist, as the contents of src/ are minified into the bundles.

@alepev alepev requested a review from RobinM-code July 4, 2023 18:03
@alepev
Copy link
Author

alepev commented Jul 4, 2023

Ready for final review

Copy link

@RobinM-code RobinM-code left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfecto!

@alepev alepev merged commit b3bb5a8 into v0.3.3/thehyve Jul 5, 2023
@alepev alepev deleted the ap/matomo-js branch July 5, 2023 17:42
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.

3 participants