Correct setup for SaaS use with 100+ subdomains

Good day,

I am the founder of a German SaaS company and would like to move away from Google Analytics and back to Matomo. About 10 years ago I worked a lot with Piwik, but then lost sight of it. So I am a returnee to Piwik/Matomo and I am really looking forward to it.

My SaaS software is an intranet solution that has between 100 to 20,000 users per client. In total we have around 100 customers, all running on different subdomains.

Before I go into my question, I would like to clarify a few basic questions in advance so that you have the best possible overview.

In what SaaS setup will Matomo be used?

  • One product fits all
  • About 100 different subdomains (one customer has one unique subdomain)
  • Around 100 - 20,000 users per subdomain
  • Access is via
    ** web
    ** PWA app
    ** iOS App (React Native)
    ** PlayStore App (React Native)

What exactly do I want to track?

  • The live map of all software usage
  • The overall use of the SaaS software
  • The individual use of the SaaS software (per client)
    ** Total usage
    ** Content tracking

What data do I want to provide to the customer admin via REST-API?

  • Overall performance
  • Which functions are used most
  • How do individual posts perform?

As I wrote above, I bring some basic knowledge to the table, having used Piwik for over 5 years and installed/configured/analyzed on my own.

Now I am faced with the crucial question:

  • Should a separate “website” be created for each individual customer?
    ** Can I then continue to see a LiveMap of all visitors?
    ** What is the best way for me to ensure that when a new customer is created, a new website and tracking code is automatically created?
    ** If I want to track individual performance, but also overall performance. Can I run two tracking codes per client subdomain?

  • Should I run all individual customers through the same tracking code?
    ** How do I then filter by customer?
    ** Can I then derive data via REST API and provide it to the customer in their posting performance?

My grandfather told me one day: ask questions in such a way that they are easy to answer. Now I ask many questions at once. But I feel that the big picture and my overall questioning is helpful. So feel free to pick your favourite parts and we’ll discuss them together :grinning:

Thank you very much for your huge help and I am very happy to finally return to Piwik/Matomo.

Best wishes

Yoy can achieve this by using package, which allows muti-tenancy i.e separate DB for each customers and can have separate subdomain for each customers.

We have integrated the above package at and we are having 1000 + customers with there own sub-domain and own DB