Is it possible to track a subset of a site?


#1

Hi
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
Carsten


(hightechguy) #2

Carsten

IMHO you have two options:
[ol]
[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
[/ol]

Hope this helps,
Jacob