Hi,
i have a web portal “demo” with three domain/subdomain:
www.demo.it
site1.demo.it
site2.demo.it
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 site1.demo.it pages and site2.demo.it 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?
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?
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.
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).
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.