Matomo
Matomo is a web analytics service that provides detailed information about how visitors interact with websites and services.
Platon has held an "Office Hour" that can serve as an introduction to Matomo, a recording from the session can be found here.
How to get Access?
-
Have you logged into Matomo before?
- If yes - Go to step 2.
- If no - Go to https://matomo.sikt.no/ and log in using the green LOG IN WITH FEIDE button. You will receive an error message, just ignore this.
-
Contact the administrator of the website you want access to. He/she will grant you the access you need.
-
If you want to use Matomo for a website that is not already in Matomo, send an email to hjelp@sikt.no and ask Platon to create a new website in Matomo. Remember to specify the name and URL of the website.
How to Get Help?
- Talk to someone who already uses Matomo.
- Read the documentation.
- Ask in our Slack channel #matomo.
FAQ
-
Q: What should I be tracking?
-
A: If you need to ask this question maybe you should not track your users at all. Tracking data should serve a purpose and not be done just to for the sake of tracking. Tracking can raise privacy concerns! However a good start is tracking page views, which will also give useful data on client locations, devices, etc.
-
Q: Should I use Tag Manager?
-
A: No! Tag Manager is a security risk where code can be pushed to production without going through your ordinary automated & manual quality checks.
-
Q: How do I setup Matomo in my web app?
-
A: See the documentation for client tracking. You need to add your SiteId & Sikt's Matomo Server URL
var u = "https://matomo.sikt.no/";
. -
Q: How do I avoid tracking during development or in non-production environments?
-
A: You should avoid contaminating your real user tracking data with data from internal testing & development. You can do that by setting up a different SiteId for all non-production environments where you can test your tracking, events, funnels, etc. It is also a good idea to use an environment variable for disabling loading of the script for use on your local machine or in production if the Matomo server should go down.
-
Q: What do I need to allow in my Content Security Policy for Matomo to work?
-
A: You need to add Sikt's Matomo Server URL
https://matomo.sikt.no/
toconnect-src
,script-src
&img-src
. -
Q: How do I use Matomo cookieless?
-
A: In your setup script add
_paq.push(["disableCookies"]);
-
Q: Is there support for Do Not Track header?
-
A: No since this spec was deprecated so was Matomos support for it.
-
Q: How do I allow for users to opt-out?
-
A: Remember to do this before loading the tracking scripts from Matomo to your client. For example with a consent banner. Do not use Matomos opt-out script, then the users has already been tracked.
-
Q: How do I track page changes in my Single Page Application?
-
A: You need to add a listener for hashchanges or manually send page tracking events with your SPA router.
-
Q: How do I track events?
-
A: See the documentation for event tracking.
-
Q: How do I track goals?
-
A: See the documentation for goal tracking.
-
Q: How do I track errors?
-
A: See the documentation for crash tracking. Howevery this is not included in Sikt's current Matomo license, and to be honest there is better alternatives for client side error tracking like Sentry or LogRocket.