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