Multiple Sites in Piwik
2008 October 22
So I was checking my analytics (piwik of course
) today and I noticed a lot of folks landing on my page after searching this title, ‘multiple sites piwik’.
Unfortunately they were landing on a page that only briefly discussed that it was a capability of piwik, so I felt alot of users were leaving with a bad taste in their mouths. To make amends Ill do my best to sum up this easy process.
Steps to add additional domains to your piwik analytics.
I’ll assume you have Piwik installed? I used a subdomain (piwik.example.com) but that’s not necessary, just nice.
- First Off log in as an admin by clicking the link in the upper right hand corner while viewing the initial page.

- Under the heading look for the tab marked Sites, and follow through.

- Click the line ‘Add a new Site’

- Enter Site Name, and primary url in the text boxes that appear
- When finished click the small green checkmark.

After a moment or so the new information should be added as another level in the table. - Click the ‘Show Code’ link in the rightmost column.

- Copy the code into the html of your site, and publish to the world.
- Open a new window or tab and Visit your site and hit any url that will activate the code you just added.
- Back to our Piwik window, Click the ‘Back To Piwik’ link

- Select your new site from the drop drop down in the upper right

- Finally change the day to the current date to see your results.

By default, and quite logically, piwik shows yesterday, the last full day of statistics.
That’s it, please comment if there is more you would like me to address.

Actually.. the reason its being searched is likely because there is zero documentation on how to use piwik with multiple domains with a single IDSITE.
Lets say someone has 100 websites.. piwik allows you to drop in upto 200 domains into a single idsite so that you can add that code to all the sites and be able to get an overview of them all from one page. Useful right?
Problem is.. Piwik only displays the page names.. and not the domain names of where the traffic is being generated. in the javascript code doc it talks about using the action_name to show page titles.. but what we really need is to see urls.
@Jonathan – Sorry for the delay.
It would be easy enough to insert
document.domainin order to get the current domain.
Alternately you can see the full url by using
location.href.
Insert into the piwik_action_name = ”; parameter…
Hope that helps anyone in your situation out. – EW
Thanks Eddie, you saved me a huge amount of time!!
There aren’t many stats program that have this feature and it should be actually much easier to implement.. I’m sure it would bring a lot more people to Piwik.
Thanks again!
I would like to find a way
to view the unique visitors
to a dozen or so sites
on one page
in chart form.
Ideally, it would be on a dozen graphs, or it could be on one chart.
Can Piwik do this?
@eawQuint
Great question. I guess my answer depends on your structure.
Piwik allows you to specify multiple domains to be considered as one site. (example : mysite.us, mysite.com, mysite.org) in which case you could view all data (unique visitors, content, times ,etc ) on one chart.
If they are unique sites in terms of content, then you obviously don’t want to go down that road. But Piwik offers a great API and export abilities, so you could easily build a widget to do this, or export the data to Excel and make an aggregate graph there.
@Eddie
I am very new to piwik.I really need your help.
Can you please explain where I need to change for full URL in reports as well as API?
Thanks.