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

1 Like

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}:

I don’t think that was the question.
The dimensions filter doesn’t let me regroup the matching strings /abc/ as 1 item that can then be displayed in a pie chart

How would I achieve this ?
example
or this for that matter
example2

Thanks!

Resolved!
For those who care, you can achieve this by creating a “Dimension value grouping” (in the settings).
The dimension is Page URL then add groups.
You can then find your custom dimensions in any chart you want.

image

1 Like