Open samwilson opened 8 months ago
There's some more information here, and an alternative way to track 404s: https://github.com/matomo-org/matomo/issues/6580
Indeed, it would be something useful to understand what the visitors do not find – MediaWiki has already the special pages Wanted* (WantedPages, WantedCategories, …) but it’s more from the point of view of the editors (what pages should we create?) instead of the visitors (what pages do we want to see? including pages not anticipated by the editors).
Given Matomo has no official method to support that (but it could appear in the future), perhaps the best way for now is to use one of the method described in the links in the parameter $wgMatomoCustomJS
(which is written before the call to trackPageView
):
And experiment what is the more convenient. When a method will be stable, it could be documented on the mediawiki.org page.
And experiment what is the more convenient. When a method will be stable, it could be documented on the mediawiki.org page.
Ah, I realise some support from this extension is necessary to conditionnally include this JS snippet only on the 404 page, or perhaps more generally add a JS variable with the HTTP status code to be retrieved with mw.config.get( 'wgHTTPStatus' );
EDIT: and I see your PR #47.
Yeah it's odd that Matomo doesn't have a better way to track them, but changing the title seems to work okay. The adding of the slashes means that it displays it grouped in the same way it does other directories.
Does that PR look ok?
@Seb35 Gentle reminder about this. Let me know if you want me to update the PR in any way.
The Matomo docs suggest tracking 404 errors like this:
Is this something that this extension could handle?