math-GH / be_piwikcharts

Extension for Open Source Content Management System "Contao": Displays an overview about figures of Piwik-Installation
https://contao.org/de/extension-list/fileview/be_piwikcharts.html
2 stars 2 forks source link

flatten getPageUrls #8

Closed asaage closed 2 years ago

asaage commented 2 years ago

This should be flat to make it useable with folder-urls and/or prepend-locale.

math-GH commented 2 years ago

Could you please give an example from before/after?

asaage commented 2 years ago

sure: With one domain and two languages/rootpages that requires basically the prepend-locale option for contao. Actions.getPageUrls returns a tree by default one level of depth per aditional / and pageviews are aggregated (at least in my matomo which is 4.12). Without the "flat" parameter i can only see the first level - the table renders as image

with "flat" the output is correct. image

that should theoretical also be an issue with auto-items in news/event pages or if you have folder-url's enabled like .../page/sub-page.html

Another solution would be to render a tree instead of a table in the be_piwikhart but that requires more effort.

math-GH commented 2 years ago

I like it very much. Thanks for this improvement