Technologies:
Tolerim
a month ago
How do I set up subdomains in Matomo?
Answers(2)
Vogi
a month ago
Verified Answer
Thank you for your response. Yes, you are correct. I have a primary domain https://example.com along with multiple subdomains such as https://one.example.com, https://two.example.com and so on. I am looking for a way to set up all of my subdomains in one configuration.
I would like to assign "the numbers" ID:1 (which is the name of the measurable element) to URLs (one.example and two.example) instead of treating each subdomain as a separate measurable component. Could you please guide me on how to do this?
Also, in the js code, which code should I address to obtain data for each subdomain separately? Thank you.
Tolerim
a month ago
To configure subdomains in Matomo, you can set up a single website with the domain set as "*.example.com". This will track all subdomains of example.com as a single website in Matomo.
To set this up, you can follow these steps:
1. Log in to your Matomo dashboard and go to "Websites".
2. Click on "Add a new website".
3. Enter a name for your website (such as "Example.com Subdomains") and set the URL to "*.example.com".
4. Set the time zone, currency, and other settings as desired.
5. Click on "Save" to create the website in Matomo.
Once you have set up the website, you can use Matomo's JavaScript tracking code on all the subdomains you want to track. The tracking code should be the same on all subdomains, as it will refer back to the single website in Matomo. To access data for each subdomain separately, you can use the "Actions -> Page URLs" report in Matomo and filter by subdomain (such as "one.example.com" or "two.example.com").