Analytics data are of this type, in particular with the application of the GDPR coming soon.
As far as I know (I haven't been really deep into Piwik's code, so I might not have found something already existing), user data can be selected (when logged, or associated to an IP), as well as exported.
An option to connect to Cozy would to enable to export one's data (let's say, the ones associated to a login) so that a Cozy connector can call them back for a user.
As food for thoughts: https://piwik.org/blog/2017/09/gdpr-potential-consequences-piwik/
Related to #6095 (and probably others, I will dive into the issues to gather some more, as a first step in the Piwik community)
This sounds like a good idea, but shouldn't this issue be created in Cozy project rather than in Piwik here?
@mattab I wanted to know if it was easily feasible on the Piwik side, as the admin of a Piwik instance will in definitive be the one that opens the tap of this data.
Indeed, I proposed the idea and will advance this more with the Cozy team.
Yes, it should be easy to call Piwik APIs to get any data you want. Learn more here: http://developer.piwik.org/api-reference/reporting-api
or here: https://piwik.org/docs/analytics-api/
if you want to export one user's data you can use the Live APIs
Super, thank you for helping the damn too lazy guy that I am ;)
@mattab I see the four levels of right a user may have (no access, view, management, superuser)
But I don't find the possibility to restrict what a user with the view rights can access (here, the Visiter Profile associated to her email address).
Note: I consider a situation in which a SSO and Piwik users are created with the SSO email adresses/usernames.
it is not possible to restrict further what a user can see. Typically you'd have a secret token auth and you could serve a particular user's data (Visitor profile for their email address) to them, without revealing the full token
I think I got the big picture but if I can rephrase, you suggest to add a "Download visitor profile" on my website which takes the infos of the authenticated user, using a piwik_user specific to this task and return the data to the user.
I want the least possible to add any layer of complexity to the API. This would ease the creation of a Piwik connector/collector for Cozy (get the Visitor profile of a user through the Piwik API for any Piwik instance (letting each Piwik instance handle user management by its own))
We probably will do something similar for GDPR compliance. Stay tuned on this...
Is there already an issue to follow about this? Should I open one?
I would like to follow closely how this will/may be implemented,
as I will start developing a Cozy collector/connector for Piwik (as a way on training on cozy stack), which will have to wait for this right management feature to be usable. I will indeed update it to the way the API will be modified.
Development of this konnector will be here https://github.com/jibe-b/cozy-konnector-piwik
Made a first step, available in file
index.js on branch https://github.com/jibe-b/cozy-konnector-piwik/tree/first-steps-toward-full-featured-konnector.