A user contacted us, hoping to audit their site for unreachable or outdated web pages nobody visits. Is it possible to find a web page which has zero hits in Matomo?
This has no official method in Matomo.
An untested idea, which I hope the community can comment on, since I lack an easy place to test it…
-
Make an API call to return a list of Page Titles and their visits. If you use ChatGPT or similar, you can tweek this on your site. I used the following API call at our publicly visible site demo.matomo.cloud to make the following call in my browser
https://demo.matomo.cloud/index.php?module=API&method=Actions.getPageTitles&idSite=1&period=year&date=2024&format=JSON&token_auth=anonymous&showColumns=label,nb_visits -
It returned this:
-
Sort this list by label (page title). Delete the other two columns: you won’t need them.
-
Next, from your hosted website, or Content Management System (CMS) get a list of all your page titles. (I leave these details as an exercise for the reader.)
-
Now list them alongside each other. This will be most easily done in a file comparison tool, like Bash Diff (CLI), or Beyond Compare (a GUI tool, free for the first 20 cumulative (not elapsed) days of use).
We see in this simple example that the page Philippines Scuba dive reviews has no visits during the period we analyzed in Matomo.
Get the list of all webpage URLs from your website. Maybe use the sitemap of your website.
Get the list of the visit pages from matomo reports. Time before, you must change the matomo settings to prevent the collection of webpages to “Other” in the reports:
/config/config.ini.php
[General]
datatable_archiving_maximum_rows_actions = 1000000
datatable_archiving_maximum_rows_subtable_actions = 1000000
You have more webpages than 1 million, then set it higher.
Maybe rearchive your reports.
Go to Behavior → Page and make the reoprt flat (
below left).
Export it.
Compare both lists. (maybe with Open Office Calc: sort columns)

