@jmumby opened this Issue on June 25th 2019

It would be good to be able to restrict user access to only certain segments. This would be useful for users who want to segment data to certain global regions or business units, while preventing users outside those areas viewing data outside of their own region.

A possible solution would be to disable the all visits option for view users and default to the first available segment. If there are no available segments then all visits becomes available.

@mathieuroquefort commented on January 25th 2022

Hello,
We would be very much interested by this option.
We have one website for the whole country, and would like to allow the delegates of each region or city to view the data for their area.
Is there somethnig we can do to help ?

@tsteur commented on January 25th 2022 Member

@mathieuroquefort you might know this already but generally there's a solution using Roll-Up Reporting see "Solution 1" in https://matomo.org/faq/how-to/faq_35687/ . However, this would only work for newly tracked data. Because the data for each country would then be in a separate site, you could grant access to specific sites/countries using existing functionality in Matomo while also having aggregated reporting data in one or multiple different sites. For example you could group all sites from a continent into a roll-up as well.

If you are after this specific feature, then you could consider developing a custom plugin or create a pull request for Matomo and we would review this.

I'd love to give you a bit more advice but I'm not sure how this would be all managed. I would assume there be:

  • a setting that a user can only view specific segments
  • a management screen where you can grant access to specific segments

I haven't thought too much about it, but I think this feature may be quite difficult to implement.

@mathieuroquefort commented on January 28th 2022

Hello @tsteur,
Thank you for your answer.

We didn't know this possibility of roll-up reporting. Unfortunately, it is a paid module, and could cost over 700€ /year. It would also require that we change completely our tags, which is quite complicated.
Especially, it would require to create all the sites at once. We have 700 local comitees. Not all 700 will ask to have access to their analytics. If only 100 ask for it, we would still nedd to create the 700 sites, just in case.

We will investigate the solution of creating a plugin. But as you said, it could be quite complicated : we would change the credentials. And we have never created any Matomo plugin. Are there other people interested by this functionnality who would work on it with us ? Could someone from Matomo help with it ?

@tsteur commented on January 31st 2022 Member

The cost could be over 600€ /year. Note that any kind of custom development will cost a lot more than that. Just on a side note: If you were to split the tracking into 100 or 700 different sites, Matomo will likely perform better since the data can be separated per site. It's just an FYI.

Indeed all tags would need to be changed to track into a separate site and you wouldn't have historical data for each site which be a problem.

Are there other people interested by this functionnality who would work on it with us ? Could someone from Matomo help with it ?

FYI we have a forum category for plugin development: https://forum.matomo.org/c/plugins-platform/11 We wouldn't be able to help with active development as much but we may be able to answer few specific questions if they come up.

Powered by GitHub Issue Mirror