Error pages and how to monitor

Hi all,

Looking for some best practices on the use of error pages. We are looking to ‘capture’ the actions leading up to a redirect to a given error page. Who has experience in tracking user behaviour / session to understand why a 404 is thrown (so we can proactively investigate the possible reasons - and fix it).

Thanks! Ben