How to have statistics for different sites/subdomains under same domain


I’ve a domain with two sites :
http://my.domain/my_site1 ==> URL1
http://my.domain/my_site2 ==> URL2

I’ve created 2 sites in Matomo and put in the field “URLs” URL1 for the first and URL2 for the second.

Next, i’ve imported log from IIS.

But statistics are the same for the 2 sites under Matomo.

What am i missing ?


If you don’t specify the --idsite parameter with log-analytics, it tries to auto-detect the siteid. But for this it only seems to look at the hostname which is the same for both of your sites.

My tip would be to use something like grep to split up the log file into two files depending on the site and then use log analytics on both files with specified --idsite.

The IIS log are the same, sure.
But i well specified the – idsite when importing.


When you specify an --idsite, then there will be no auto-detection and all lines in the specified log file will be logged into that idsite .

So, it could be a good new feature for a next release of Matomo :+1: