You can capture as much information you want. Once you get to know where your website users are hitting 404 or broken links you can easily fix those errors and provide a good user experience….
How to use PHP to capture essential Information on 404 Error Page
