Hacker News new | ask | show | jobs
by richardv 4709 days ago
Has anyone installed Piwik for multiple accounts?

My product allows users to create and launch their own website. I'd quite like to be able to quickly provide basic statistics for users (alongside Google analytics if they want it).

We run a multi-tenant application so have thousands of sites running from the same codebase, however, each site owner would need it's own statistics. At the moment, we just let users provide their own Google Analytics, but it would be nice to report to Piwik I think and give them their own preconfigured stats area?

4 comments

I've used it in the past to do something a bit similar. I had a sort of "master account" that was installed on all domains and then a second individual one per domain. Piwik worked really nicely and gave the end user the ability to see a sort of "combined stats" as well as per-domain stats. We couldn't get GA to work in this way (I think that has since changed).

This was about two years ago now and I've followed the development on and off and it's certainly come on leaps and bounds. It's definitely worth some investigation for your use-case.

I've done this on the product I'm developing. You can set it up programmatically and it works exceptionally well. That being said, there are some performance considerations, especially if the sites you're hosting are high traffic.

I'd recommend reading the documentation and doing a bit of searching for a configuration that will fit your needs before you begin. It will save you a lot of time.

Good luck and let me know if you have any specific questions!

This is possible, i do exactly this with a multi-site WordPress install.

The plugin i use for that is: http://wordpress.org/plugins/wp-piwik/

Maybe you can get an idea how to do it with your codebase from that...

Yes, you can create additional users within Piwik and grant them access to specific websites.
Looks like it's possible to do this programmatically even:

http://piwik.org/docs/analytics-api/reference/#UsersManager

http://piwik.org/docs/analytics-api/reference/#SitesManager

(and if there are some quirks in the way, file a ticket etc.)