Is it possible to track a subset of a site?


We are using piwik to track a number of Drupal sites. Is it possible on one of these sites to create a subgroup/subset of urls? let´s say I want to create a custom report for Druapl nodes 1000,1001 and 1002. Is this possible? Basically i want to do something like groups in siteimprove.

Best Regards

(hightechguy) #2


IMHO you have two options:
[li] Register several (‘virtual’) sites
[/li]Just go to the Piwik interface and register several sites. Then define you criteria - what pages will use what “site”. Write simple Drupal module to keep this logic and serve appropriate Piwik code (with siteId that fits your criteria) to _paq.push([“setSiteId”, “10”].
In this case your site analytics will be split completely in the Piwik interface
[li] Use virtual pages
[/li]trackPageView() method normally used without parameters, but you can set virtual path to any page of your site, i.e. instead of _paq.push([‘trackPageView’]); let Drupal module write it dynamically, based on your logic, for example _paq.push([‘trackPageView’,'group 1/sub group 1001/my-page.html ']);
In this case all pages of your site will appear in one interface and may be easy distinguished by their prefixes

Hope this helps,