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.

  1. First Off log in as an admin by clicking the link in the upper right hand corner while viewing the initial page.
    pw11 300x95 Multiple Sites in Piwik
  2. Under the heading look for the tab marked Sites, and follow through.
    pw21 300x240 Multiple Sites in Piwik
  3. Click the line ‘Add a new Site’
    pw31 300x151 Multiple Sites in Piwik
  4. Enter Site Name, and primary url in the text boxes that appear
  5. When finished click the small green checkmark.
    pw4 300x102 Multiple Sites in Piwik
    After a moment or so the new information should be added as another level in the table.
  6. Click the ‘Show Code’ link in the rightmost column.
    pw5 300x63 Multiple Sites in Piwik
  7. Copy the code into the html of your site, and publish to the world.
  8. Open a new window or tab and Visit your site and hit any url that will activate the code you just added.
  9. Back to our Piwik window, Click the ‘Back To Piwik’ link
    pw7 300x69 Multiple Sites in Piwik
  10. Select your new site from the drop drop down in the upper right
    pw8 300x92 Multiple Sites in Piwik
  11. Finally change the day to the current date to see your results.pw6 300x128 Multiple Sites in Piwik
    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.

8 Responses leave one →
  1. 2008 November 7
    Jonathan permalink

    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.

  2. 2008 December 20
    Eddie permalink

    @Jonathan – Sorry for the delay.

    It would be easy enough to insert

    document.domain

    in order to get the current domain.

    Alternately you can see the full url by using

    location.href

    .

    Insert into the piwik_action_name = ”; parameter…

    piwik_action_name = location.href;

    Hope that helps anyone in your situation out. – EW

  3. 2009 June 6
    Marcadr permalink

    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!

  4. 2009 July 8
    eawQuint permalink

    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?

  5. 2009 July 8
    Eddie permalink

    @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.

  6. 2009 July 22

    @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.

Trackbacks & Pingbacks

  1. Open source project Piwik puts Google Analytics on notice | Edward A. Webb (.com)
  2. how to use Piwik analytics in CakePHP sites | Edward A. Webb (.com)

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS