matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.87k stars 2.65k forks source link

Feature Request: segmenting on Operating System families #6707

Open mtandersson opened 9 years ago

mtandersson commented 9 years ago

Segementing data is nice! It would be even better if it would be possible to segment on Operating System families

mattab commented 9 years ago

Hi @mtandersson Thanks for the suggestion. cc @sgiehl

sgiehl commented 9 years ago

Adding a segment for that is not that easy as we do not store the family in the log tables. That means we would need to map the given family to the os short codes it contains and search for those instead

mattab commented 9 years ago

@sgiehl does Device Detector has the map of OS Short code <-> OS Family? if we have this map, then we can create a callback and use it in the segment metadata with: setSqlFilterValue as in this example: https://github.com/piwik/piwik/blob/master/plugins/Referrers/Columns/ReferrerType.php#L27-27 or: https://github.com/piwik/piwik/blob/master/plugins/API/API.php#L162-162

sgiehl commented 9 years ago

@mattab I don't think it's that easy. There is a mapping for OSFamily => OSShortCodes. So there may be more than one short code in a family. Your examples provide a 1:1 mapping.

mattab commented 9 years ago

So there may be more than one short code in a family.

that's alright, the segment would then do browser_code IN ( val1, val2, val3, val4 )

But i'm not sure if this is already implemented and easy to do... will need to check later (moving to Mid term)