Create bar/pie chart that groups page urls viewed over time, grouping page urls by a string they contain

Hey. I want to create a report that plots (assume bar chart) # page views of different page urls, but group the page urls based on a string match

e.g. group page urls based on {matching_string}. So https://…/{matching_string}/abc and https://…/{matching_string}/xyz would be considered the same page url in this case.

I then want the x axis to be labelled with the matching string for each bar.

I am not sure how to achieve this in Piwik. I assume it is possible as it is probably quite a common one people want to plot

Hi,
You can filter this out by using a Filter dimensions in the Edit report section just as in this example:


Instead of the blog value you can replace it with your {matching_string} value.

You could also create a segment based on the same conditions and then add it to your reports: Group visitors into segments | Piwik PRO help center

If you have multiple values in you Page URL that you would like to filter out, then instead of Page URL contains you could use Page URL matches regex and then add multiple values in there, e.g. {matching_string 1}|{matching_string2}|{matching_string3}: