Filter pages within a domain


(alphabeta) #1

Hi

I’m new to Piwik, and would like to know if it’s possible to filter visits for sub domains so different groups can view different reports.

For example, if I have a domain namw www.piwik.com and have three websites such as
www.piwik.com/boats
www.piwik.com/planes
www.piwik.com/cars

I want to allow each of the 3 groups (eg boats) see the stats for their own sub-pages. I don’t want to add 3 separate piwik tracking tags as if they were separate websites. A cms controls the design of all the pages, so one tracking tag will appear in all the pages.

Can anyone explain how it can be done?

Thanks
alphabeta


#2

It’s one tracker per site or group of site.
For a page to be considered belonging to another site, the site ID in the tracker must be different.
Also, a site for that ID must be setup in Piwik.

There’s no way around this. Piwik wont present you with the list of pages of your site to let you choose wich one should be considered as another site. Piwik doesn’t automatically know all pages on your site. A visit to the page must happen. And after that, it would be too late to change to page to another site.

Sorry.


(Burkhard) #3

You could try and extend the standard piwik tag by a mechanism like this:
“if this code has been loaded from www.piwik.com/boats then idsite=1” etc

In that case, the tag is the same in all of your subdomains. I am using that method to tell between test and production installation without changing the code.

–> h t t p : //forum.piwik.org/index.php?showtopic=9671


(alphabeta) #4

Thanks TulipVorlax and Burkhard, and apologies for the delayed reply.

Burkhard, your solution seems right, and I am looking to see if I can extend the solution to multiple subsites within one main domain.

Perhaps this is a feature that can be requested for development, as I’m sure many organisations that will want to use Piwik will be using a CMS.

Cheers
alphabeta


(Burkhard) #5

thanks alphabeta

One of the devs had already asked me to write a chapter for the FAQs that would elaborate a bit on using the piwik tag in a JS heavy environment. Differentiating between “where have I been loaded from” is only one of the aspects. That tells me it’s too specific to be a built in feature. Unfortunately my “solution” is not productive yet for sheer lack of time (it’s only a job I do on the side), and I really want to be sure what it’s worth in real life.

But hang on, one fine day… :slight_smile:


(alphabeta) #6

[quote=Burkhard @ Jun 22 2010, 03:54 PM]thanks alphabeta

One of the devs had already asked me to write a chapter for the FAQs that would elaborate a bit on using the piwik tag in a JS heavy environment.[/quote]

Cheers Burkhard

Here’s another alternative solution. If all the information is stored within the piwik database, can the piwik reports program use knowledge of the sub pages to present a different “view” (or profile) of the same set of pages, so that eg one can view the stats for all pages that use “www.piwik/boats” as a suffix?

Then the same tag can be used for all of the pages.

Any thoughts would be welcome.

alphabeta