You should be able to add the JavaScript tracker on a custom 404 page, and then you should get the offending page from the referrer. Depends a little on the web server platform and setup.
yes if you create a new website in Piwik specifically for this page, and add the piwik code to this page, you will then see all referers leading to the 404 page in your reports for this website.
It was put there to encore the “/” otherwise it would create too many categories in the Page title report. Technically we should only replace the “/” in the strings with the encoded /.
and tried the same tests and it worked. The page titles come up as the url entered with 404/URL= …
When using this, under Actions->Pages , the file listed is the invalid url rather than the filename of the error 404 page. Is this the way its supposed to happen?
in the case that the piwik tracking code exists in a Joomla site template (which is the right place to add the piwik code), if I add this code again (with the addition for the 404) in the 404 page article, then in the source code of the new 404 page, I get both piwik codes, which I don’t think is right. One gets generated from the Joomla template and one from the article.
In fact (without adding the code as described here: How to - Analytics Platform - Matomo ), if I go to Actions > Page Titles, I do already have 404 page hits recorded by piwik, but the number I see (about 2, 3 hits) is not real.
I also tried creating a goal for pages that include the word “404”, and it records nothing.
To avoid generating the code twice you will have to implement a variable check in the FOOTER file, for example
404.tpl: contains piwik code and sets a “template variable” (whatever template language joomla or wordpress or etc. uses)
piwikCodeAlreadyDisplayed=true
footer.tpl: display the js code only if piwikCodeAlreadyDisplayed==false (or not defined)