Flatten View For A Specific Directory

You know the “Make it flat” option on the widgets (Pages for example)? Ok, so that is really neat, but I need something a little more specific. I need a “flat” view for specific directories, but without separating those directories from the rest of the site. Let me try to provide an example.
My site is www.mysite.com

I have some directories like:
www.mysite.com/Org1
www.mysite.com/Org2

Those directories might even have other folders/directories, like:

www.mysite.com/Org1/Dept1
www.mysite.com/Org1/Dept2
www.mysite.com/Org2/Dept3
www.mysite.com/Org2/Dept4

And sometimes, those sub-directories might have folders and more within them. At this level it would be for images, files, etc…

What I need is to be able to have the “flat” view for let’s say “Org1”, as well as in the “Dept2” directory independently. But I still need to have the capability of viewing the entire site as I currently can in either hierarchical or flat view.

My point behind this is I have a site with different departments of our orginization having their own directory, and some of those departments are within a specific “Organization” of the company. And I need to be able to see the top views for each organization, and department, as well as the site as a whole.

I have been researching, testing, and reading as much as I can and I have yet to find it. I’m sure it’s out there and I am just overlooking it. Could someone please point me in the right direction? Either an API, plugin, or whatever is fine. I can use any, just need to know which one and how. I have played with the API’s some, but I am yet to be able to figure out how to make it do what I need it to do.

I hope this all makes sense. Thanks!

If i understand you correctly you are trying to set up let us say individual widgets for each organization and or department so they can view their own base metrics? If so why not just filter out the results from the list and create a custom widget for each, each is based on pages so you could create a dashboard and have multiple orgs or depts filtered out each their own.

It is based on your folder level 1 or level 2 the filtering depends on the structure of the org or department you have setup so can be tailored as desired.

/Org1/ when its an entire org

/Org2/Dept3/ when its a specific department of an org

even mix them up /Org2/Dept3/ /Org4/Dept5/ so results are combined for the 2.

as long s your taxonomy is nicley organized you should be able to do this easily as well as regex.

Are you referring to using customer variables? I tried using a custom variable for each department, but it just gave an overview of how many hits in each variable, and didn’t provide all the pages that make up that number. Like Dept1 has the variable Dept1, and when using the custom variable widget, it shows 100 hits in Dept1. But I want to know how many hits per page within Dept1 make up that.

Or did I completely misunderstand what you meant? I’m still learning all the things Piwik can do…

No no custom variable is needed.

When you do a pages report do you get a list of many pages?

/Org1/Dept1
/Org1/Dept2
/Org2/Dept3
/Org2/Dept4

If so then making a widget using a filter on the results will allow you to define as granular as you like, then make various widgets for each group or department.

Ooohh, Ok, I got you now.

I have made a widget, got it active in the dashboard and all that. I figured out how to use the “PatternRecursive.php” to filter the results, but the problem I’m having is I can’t figure out how to get the filter to read the full URL. When the widget is loaded, it defaults to hierarchical view, and the “Page URL” column (I’m using the getPageUrl function, basically mimicking the Actions widget), shows only the current level. As an example, all items under /Org1 section once expanded only shows for example “/Dept1” and “/Dept2” , etc…

I know I am good at being confusing when trying to explain these things, but in short, I can’t figure out how to get the entire URL as my parameter to filter. Any suggestions?