feat: Added matamo tracking feature for listaflow
This PR integrates Matomo page tracking to help get us better analytics. The implementation is inspired from https://matomo.org/faq/new-to-piwik/how-do-i-start-tracking-data-with-matomo-on-websites-that-use-react/
Supporting information
- Jira ticket: BB-8492
- #129 (closed)
Discussions
Link to any public discussions about this PR or the design/architecture. Otherwise omit this.
Dependencies
None or link it here.
Visual changes
None
Merge deadline
"None" if there's no rush, "ASAP" if it's critical, or provide a specific date if there is one.
Testing instructions
Step by step procedure
- Set up listaflow, run
make
- Now change the directories to
frontend
- Add
REACT_APP_MATOMO_TAG_MANAGER_CONTAINER_URL="https://analytics.opencraft.com/js/container_Ul9K7fOC.js"
infrontend/env.local
- Now run
npm start
- Now when you log in and go to the
developer tools
(Ctrl+Shift+i) under the network tab you should see a POST request being made to the URL. - Navigate through the pages and see the request being made.
Author notes and concerns
You might have to disable adblocker etc for this to work because sometimes the browser blocks such requests for the local server.