How to track 404 errors in Google Analytics


3


In this tutorial, we will take a look at how to find 404 page not found errors on your website and and see which page referred that traffic.

A 404 error is when a website’s server can’t find the page you’re trying to access via a hyperlink or typing a URL in your browser.

Having 404 error pages on your website can lead to a bad user experience, a negative first impression, and even damage your search engine rankings and traffic you get from SEO.

For this reason is it essential to fix 404 page errors.

There are 2 ways you can track 404 errors in Google Analytics and see which page referred that traffic:

  1. With Google Analytics only

  2. With Google Tag Manager, by sending events in Google Analytics

Using the standard reports in Google Analytics #

This method can report errors from whenever Google Analytics was installed on your website. You don’t really need to use events to track 404 errors in Google Analytics. The default reports, with the right filters, already contain this information.

Google Analytics 4

Navigate to: Reports > Engagement > Pages. Next, In the search field enter the title (or a part of it) of the 404 page. In my case “Page not found”.

image 77

Now, we can add secondary dimensions to get more useful insights. There are 2 secondary dimensions which are of interest to us:

  • Page path

    This allows us to see the exact URL of each page which returned a 404 error.

    To see that, click the plus icon in the report (to add the secondary dimension). Next, select Page path dimension (it is available in the Page/screen section).

    image 82
  • Page referrer

    This report allows us to see where did traffic come from when landing on a broken link which returned a 404 page.

    As before, to see that, click the plus icon in the report (to add the secondary dimension). Next, select Page referrer dimension.

You can create a custom report for an in-depth analysis.

Example of 404

Universal Analytics

Navigate to: Behavior > Site Content > All pages. Next, switch the Primary Dimension to Page title

image 1.png?compress=true&quality=80&w=900&dpr=2

Now, you will have a list of all the titles of your pages. Next, we want to filter only pages which returned a 404 error. Typically, their title is page not found, so that’s what we’ll type in the search box of our report.

If your website returns a different title for 404 pages, please use that one instead.

image 9.png?compress=true&quality=80&w=1024&dpr=2

Now, we can add “page” and “Full referrer” as secondary dimensions.

image 13.png?compress=true&quality=80&w=1024&dpr=2
image 12.png?compress=true&quality=80&w=1024&dpr=2

Using events through Google Tag Manager #

This method, while it has it benefits as it gives better control, has a major drawback compared to the previous method: it will only start collecting data from the moment this error tracking has been implemented.

Leave a Reply

Your email address will not be published.

Thanks for commenting