Multiple domain/sbdomain with same SiteId (same tag) but separate report

i have a web portal “demo” with three domain/subdomain:


For all i use same tag, so the same SiteId, because I need the total stats for the portal “demo”.

Same time i need specific statistics for each domain/subdomain (e.g. page list).

I can’t use segment because segments work on visits, so, in the “page” report i would both pages and pages if user view them in the same session.

I can’t use search function in report because domain are not shown on URL page so i can’t filter for domain/subdomain.

How can I solve this problem? Anyone know how to help me?


I saw two premium plugin:

  • Roll-Up Reporting
  • Custom Reports

maybe one of this can solve my problem?

If I understand how it works, with Roll-Up Reporting i have to create a specific SiteId for each domain and after i can gruop them to get total reports. The problem is that, in some case, i have different domain that share same template, therefore the same Matomo code and i can’t use a differente SiteId for each of this.

With Custom Reports i can create custom report (as the name says) but only filtering existing dimension. So, if the domain name it is not stored by Matomo (as I understand) i can’t filter by domain name. Thats right?

Hello Simone,

sorry, i have read your question last week but no time to answer. I had remember me for a solution for that, i had seen for many years and yet found. It must be activated for every tracking code separatelly.

_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);

I have a same situation and consider long ago for this, but i am still unsure whether its necessary.

More infos about that scroll to “Custom page title”:

I thought about this workaround but i didn’t understand how to set it in the tag manager (the guide only explains how to do it for normal tracking code).

Hi @SimoneF
For the last suggestion, you can create a data-layer variable (eg. called root) and configure your page view tag like this:

About your initial issue, you could track in each subdomain in a new target site (mesureable) in Matomo. This is very easy. Keep the initial measurable (for example site ID = 1) for all trackings, and create as many measurable as subdomain (in your example site ID 2 to 4 included).
Then just create:

  • 1 additional Custom JavaScript variable, that returns the site ID corresponding to the subdomain (from 2 to 4). Eg. subdomainSiteId
  • 1 additional Matomo Configuration variable that uses {subdomainSiteId} as Matomo idSite. Eg. subdomainTrackingConfig
  • 1 additional Matomo Analytics tag of type Pageview, using subdomainTrackingConfig configuration, triggered on the same trigger than the initial Matomo Analytics tag.