Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Managing multiple subdomains in Piwik; several solutions to choose from? #776

Closed
mattab opened this issue Jun 10, 2009 · 2 comments
Closed
Assignees
Labels
Critical Indicates the severity of an issue is very critical and the issue has a very high priority. duplicate For issues that already existed in our issue tracker and were reported previously. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@mattab
Copy link
Member

mattab commented Jun 10, 2009

This is a very common use case: Piwik users add the Piwik tag on multiple websites, multiple subdomains.

How to get stats from two websites as well as consolidated stats for both websites?

You can do this by creating a new website for the consolidated stats. Then you would have to add the Piwik tracker code on the websites you wish to consolidate. This means that on each page view, there will be two Piwik requests. Not ideal, but the only way to do this in Piwik currently.

What is the current state?

  • case 1: if the user creates one Piwik website for each subdomain/domain, then the javascript code is different and the data is logged under the given website ID
  • case 2: if the user tags multiple domains or subdomains with the same Piwik Javascript tracking tag, all the data will be logged under this website ID

Case 1 is fine, it is the user's choice to log his data in separate Piwik instances; He might have some rollup reporting concerns, for example if he wishes to get total numbers for all his websites or a subset of the registered Piwik websites. See #389 for multi website dashboard reporting and #455 for defining sets of websites.

Case 2 however is problematic. All the data is logged in Piwik and Piwik doesn't show the subdomain in reports. Therefore if two differnt subdomains have the same page, eg. "s1.A.com/dirB/pageC" and "s2.B.com/dirB/pageC", they will be aggregated in the UI in the same entity "dirB/pageC".

Instead we could report the subdomain as well in the Pages report.

    1. For example in the settings for this website, the user could decide: "show subdomains in reports" or "aggregate all data as if it was coming from one subdomain".
    1. an alternative solution is to simply do
piwikTracker.setDocumentTitle(document.location.host + document.location.pathname+document.location.search);

in the javascript code which will set the page name with the first element being the domain name.

Note on 1) The drawback would be that this setting would be tied to the archived data; if you are in mode "show subdomains" the report would have the subdomain as category0. If you are in mode "do not show subdomains" then category 0 would be the first website directory (from all domains). Therefore when changing the setting, only future stats will have the new presentation (which is confusing for the user).

Other note: this might also be an issue when we do #556, as we should link to the full URL, and in some cases as above, the same "page" would have multiple URLs... In this case, it should for sure be duplicated in the report (one for each URL), but really it would maybe make more sense to show in the level 0 of reporting (before the user expanded any row), the subdomains instead of showing the first directory, as it does currently.
Alternatively, we could just show directories and pages, and duplicate page names for each subdomain if pages have similar names (which I think is what Google analytics does).

Also, having the multiple sub domains in the same Piwik website makes harder to compare visits on each website over time, compare comversion rate on each website, etc. Piwik doesn't have real time segmentation feature so we would have to process all reports for the segments "subdomain" and then update the Piwik UI to report data for all segments.

Resources

This ticket a thought-dump, please let us know in a comment what you think

@mattab
Copy link
Member Author

mattab commented Jul 29, 2010

I will implement Page title group by subdomain option in the JS tracking tag.

@mattab
Copy link
Member Author

mattab commented Nov 23, 2010

Decided that this is the same as #1657

@mattab mattab added this to the Future releases milestone Jul 8, 2014
@mattab mattab self-assigned this Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical Indicates the severity of an issue is very critical and the issue has a very high priority. duplicate For issues that already existed in our issue tracker and were reported previously. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

1 participant