It is useful to know the information on 404 pages, to find out what visitors are looking for and to recommend them, to help add new content to the site and fix the problematic links. How do I use Google Analytics to track and display 404 pages? Google Analytics's official blog introduces an easy way to use Google Analytics to track 404 page errors on a site.
1. Add the Google Analytics tracking code of the website to 404 pages.
2. Modify the Google Analytics code for the 404 page to change the code to form:
<script type= "Text/javascript"
Src= "page=" + _udl.pathname + _udl.search);
</script>
3. The report of the/404.html page can be viewed in the hot content report, including the URL address where the error occurred, and the page where the visitor was last visited (referral source). Through this information, you can check the relevant pages in time, modify the error link.