Is it possible with Piwik?


(supergarry) #1

Hi,
I’d like to know if the following setup is possible with Piwik:
I have a website. For example www.example.com
And I have 10 clients.
Each client uses requests only with its own CLIENT_ID:
www.example.com/page.php?CLIENT_ID={client_id}&page_id=
Where {client_id} is numbers 1,2,3,4,5,6,7,8,9,10
I’d like to create 10 websites in Piwik dashboard for each client
and 10 users, so that each client has access only to one website
and can see only its own statistics.
How can I implement this?
Thanks.


(vipsoft) #2

Is it possible? Yes

How to implement it is left as an exercise for the reader. You can create sites and users manually, and embed stats on custom pages. You can use the API to create users and sites programmatically. You can use the API to retrieve data, roll your own widgets, etc.


(supergarry) #3

Can you tell me which API method I can use, please?
I wanted to get all URLs containing "CLIENT_ID=1’ as example.

I can retrieve this information manually with the following SQL quiery:
select * from piwik_log_action where name like ‘%CLIENT_ID=1%’;

Thanks


(vipsoft) #4

Please go to the dev zone. You’ll find more detailed info there than I could ever summarize into one post.