I am wondering if there is a way to mark specific pages as product pages for Matomo tracking. Then using PHP (and API?) to fetch a list of the 10 busiest product pages for the past 30 days. Finally use this data to build a most popular product list in the menu.
Thanks and sorry, am a total newbie with both Matomo and setting up analytics in general.
Thanks. How do you call custom dimensions as a segment?
I found customDimensions, added the module, created a dimension, updated our javascript on the webpages. And have tried a few calls and keep getting an error message "not a supported segment’.
After some experimentation, discovered &segment=dimension1==value stops the error messages, but doesn’t seem to actually filter as the returned xml data is the same no matter which value I use. It returns all the pageviews since the customDimension was created only, it does not filter based on the value specified for the customDimension.
Thanks, looks like using customDimensions will not really do what I had in mind. Using plan B at the moment, fetching data from Matomo, then filtering results against an array of pages, then processing data for the specific pages of interest.