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,