Skip to main content
Gå til innhold

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?​

  1. 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.
  2. Contact the administrator of the website you want access to. He/she will grant you the access you need.

  3. If you want to use Matomo for a website that is not already in Matomo, send an email to Sikt's internal help mail address and ask Platon to create a new website in Matomo. Remember to specify the name and URL of the website.

Using Matomo with AI assistants (MCP)​

Matomo has an MCP server that lets AI assistants such as Claude read your analytics data. You can ask questions like "How many visits did my site have last week?" or "What are the top entry pages this month?" and get answers from Matomo directly.

You log in with your own Matomo user through OAuth, so the assistant only sees the websites you already have access to in Matomo.

info

The MCP server is read-only. Even if you have write or admin access in Matomo, the AI assistant can only read reports, sites, goals, segments and dimensions. It cannot change anything, and raw Matomo API calls are disabled.

Claude Desktop​

A Platon Matomo connector is already set up for Sikt.

  1. Open Claude Desktop and go to Settings → Connectors.
  2. Find Platon Matomo and click Connect.
  3. Log in to Matomo in the browser window that opens and approve the access.

Claude Code​

Add the MCP server with this command:

claude mcp add-json --scope user matomo '{
"type": "http",
"url": "https://matomo.sikt.no/index.php?module=API&method=McpServer.mcp&format=mcp",
"oauth": {
"clientId": "a80642dedd3b733ada1d548015436d1b",
"callbackPort": 29352,
"scopes": "matomo:read"
}
}'

Then start Claude Code, run /mcp, select matomo and log in to Matomo in the browser window that opens.

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/ to connect-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.