Home Assistant integration for Matomo Analytics

Hi,

I’ve built a custom integration that brings Matomo statistics into Home Assistant. If you’re running both Matomo and Home Assistant, you can now see your website analytics directly on your HA dashboard.

The integration connects to the Matomo Reporting API and creates sensors for:

  • Unique visitors, page views, visits, actions (today / this week / this month)
  • Live visitor count (last 30 minutes)
  • Aggregate stats across all sites (optional)

It supports multiple sites, has a UI-based setup (no config files to edit), and works with Matomo 4.x+ (token is sent via POST).

The source code is on GitHub:

For Home Assistant users - it’s installable through HACS as a custom repository.

Feedback, suggestions and bug reports are welcome. If there are specific Matomo API endpoints or metrics you’d like to see exposed as sensors, let me know.

Great work! Do you have any screen shots of it action, like the kind of reports you get?

1 Like

Hi :slight_smile:

I’ve added screenshots to the README. If anyone is interested in translating it into additional languages, I’d be grateful for your help.

You can also leave a star rating in the repo :slight_smile:

PS.
For example, I am posting a chart of “live visits” with a 5-minute aggregation:

PS2:
The texts in the screenshots are in Polish, because that’s the language in my ha.

I am trying to get my head around this :slight_smile: what a visit in terms of home assistant? How are you calculating the confidence band?

Matomo itself is not tracking “visits in Home Assistant.” :slight_smile:

What’s happening here is that the integration simply pulls data from Matomo into Home Assistant and displays it there. The visits, sessions, page views, etc. are still being collected and calculated by Matomo for specific websites- exactly the same way as in the Matomo dashboard.

Home Assistant is only used as a visualization layer for the data that Matomo already gathers for selected websites.

Regarding the confidence band- it’s also calculated by Matomo (for example in forecasting or trends reports), and the integration only fetches and presents those values. There is no additional statistical processing happening on the Home Assistant side.