I'm working on a site where we have many page groups, with a similar URL scheme for each one, along the lines of
/groupa/page1 /groupa/page2 /groupa/page3
/groupb/page1 /groupb/page2 /groupb/page3
generally users will be visiting only a single group per visit, but they will sometimes visit multiple groups. We want to be able to track for each group how many people visited it. Ideally it would also be nice to see how often people visited page1 page2 page3 (etc) regardless of group. The second one should be easy to do with custom variables, but I'm not sure how to proceed with the 1st one.
We've tried to implement it with custom variables, but have run into the problem of associating multiple "group visits" with a visit. An event has the same issue, as we want to effectively only have 1 instance per group per session.
How can I implement this? I'm open to suggestions involving further tracking events on the page or some sort of filtering within the analytics app itself. It can be assumed that the group name will be the first segment of the URL after the root URL if that helps.
Update based on comments:
I've now tried solving this with custom content groups and segments.
Segments allow me to view the information the way I want (I can see visits which include a pageview within a certain group), but I can only view 4 of them at a time. I want to view a table of these segments. I also can't define these programmatically based on URLs and would need to add one for each new group.
Content groups allow me to define groups programmatically, but can only be associated with page views. I see no way to see "visits which included a view of a page in this content group" which is really what I want.
To clarify I want to see a table like this, where a visit is "a visit where the user visited a page within a given group" So the sum of the visits column may be greater than the total # of visits since visits may be counted twice.
groupname | visits
===================
groupa | 100
groupb | 90
groupc | 75
I would prefer a solution that can be seen within the app, but can also work with something that requires the API. I'm also fine with solutions that involve upgrading to GAs new universal analytics platform, but please specify if that is required.