matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.76k stars 2.63k forks source link

[RFC] Best way to track 404 errors? #6580

Open mpdude opened 9 years ago

mpdude commented 9 years ago

There is a FAQ entry how broken URLs/missing pages can be tracked. It suggests tweaking the tracked page title to contain the page title, HTTP referer and page URL.

This looks a bit hackish to me, so I figured out how custom variables and segmentation could also be used to achieve similar results and wrote a blog post about it. What I did not know at the time of writing is that the "Actions > Page Title" report will split the title at boundaries ("/" by default) and provide aggregated numbers. So, you should be able to get information for a) all 404 pages, b) for a particular missing URL and c) for all referers to a particular URL.

Then I came across piwik/developer-documentation#19 where custom variables are used on the error page, just like described in my blog post.

Thus, I'd like to open a discussion on which way might be better. What are the pros and cons of each? Does one yield insight the other one cannot provide? Does it make sense to use both?

Some aspects to get us started:

wikiloops commented 9 years ago

Hey :) I'd like to add some thought here, have been thinking about "error tracking" myself lately, not restricted to 404 tracking, but on a more general level - hope you'll agree the following is worth considering in the context you adressed here.

From a UX point of view both ways you adressed have in common that a user has to take action, either by checking the "Actions > Page Title" report and looking at the Transitions-Popup, or by switching to a segment displaying the results of a custom variable. The latter version requires more set up work, so much can be said without looking at the value of information found by either approach.

What I perceive as much easier UX wise is the following concept: By defining a visit to my custom 404-page as a PIWIK-"goal", I will get very obvious visual markers within the standard display of pages navigated by a user, and will be able to follow the pre- and post activity around the event at first sight. I just tried, and it seems it is not possible to create a segmentation-by-goal at this point, which would be usefull to spot less common navigation-trails I might otherwise miss.

Reading thru the PIWIK documentation, I found the "Ecommerce Activity log", which seems to be capable of showing the data I was looking for, if I'd dare to declare the 404 as an ecommerce goal.

What I am trying to point out is: It would be very helpfull to have error indication at the same display level as the "flag / shopping cart" icons - and since we are tracking "anti-goals" here, some less enthusiastic icon would be needed :) The ecommerce reports looked very promising for setting a focus on visitors which experienced errors, so maybe a solution can be found there.

hpvd commented 8 years ago

maybe a list of all 404 urls and the referres used to go there could e.g. be also part of a new plugin which provides a new menu point: "Find the bad" and also contains the functions: "Inverse" page tracking - to find bad pages #10519 "Inverse" Custom Event tracking - to find bad elements/functions #5186 "Inverse" Content tracking - to find bad pieces of content #10520

what do you think?

hpvd commented 8 years ago

this is also related to Improve 404 errors reporting: new dashboard widget for 404 #3563