Tracking error 404 pages in Google Analytics should definitely be done using Pageviews.

Why are error 404 pages so important? Because they affect the visitor experience so profoundly. Web Analytics is the art of measuring the online channel,  so it must take error 404 Pageviews into account . If a visitor encounters an error 404 page on a site it can impact visitor’s perception of the quality and the brand of the organization, or worse yet, impact the conversion rate and bounce rate for the site. If you are not tracking error pages, then you should start doing so now, as you may not even be aware of thousands of negative impressions being generated. If you would like to know more about what 404 error pages are, the effect they have on your traffic and how to mitigate their impact on your visitors, feel free to also read Jordan’s post on 404 error pages.

Google Analytics is a great tool that allows deep insights into the visitor experience, but by default, it will not measure error 404 Pageviews. To do this you must find the error 404 templates on your Web server and add some Google Analytics tracking code (The standard Google Analytics Page tag will report Pageviews, but you could also use Google Analytics event tracking ). Note that two common types of errors (error 404 “Not Found”, and error 403 “Forbidden”) can both be tracked in this manner.

Event tracking in Google Analytics is a new feature that was invented to provide an alternative method of measuring site activity that would not impact other key indicators including Pageviews, and the average number of Pageviews per visit. Below are the reasons why you should continue to use Pageviews to measure error 404 occurrences, instead of jumping on the event tracking band-wagon.

1) To take advantage of the Google Analytics onsite page navigation report in order to help us identify the broken link on our own site and understand what visitors are doing after a 404 experience. This means you can look at the specific sequence of pages our visitors view. Error 404 pages are part of this sequence, and can help us track down the source of errors, and identify the impact of error 404 pages.

2) To take advantage of the referrer report. The 404 error page may be a landing page in which case you will want to identify the referring site under ‘traffic sources’, and Google Analytics events allow us to drill down to the precise referring URL (click ‘Visit this referring link’) to visit the page with the broken link that is pointing back to your site and is resulting in an error 404 Pageview. If the referring site is a partner,  you can advise the partner of the correct URL for the resource and you can ask for a correction of this link. Look at the ‘landing page’ report under ‘Content’ and use the inline filter to isolate the error 404 pages that are the first page a visitor sees on your site (remember what people say about first impressions – very important!).

3) To think outside the 404 box. When a 404 page is encountered by a visitor it is generally considered a bad experience, but you can also treat this as an opportunity. You could include the site map on a formatted and branded 404 page, or by highlight the best content on your site (cross-selling) and showcase it on the error 404 page. Using the 404 error page in this way qualifies it as a regular Pageview, so an ‘event’ really doesn’t make sense. In addition you will want to include the onsite search box on the formatted and branded 404 error page. This gives us more information about the sessions in which the 404 error was encountered, including the ‘visitor intent’ – the visitors with 404 errors may tell us exactly what they were looking for on our site.

4) To take advantage of the goals and $index report. If you are using the $index reporting feature of Google Analytics you may even start to see the benefits of the ‘elegant error handling’ associated with a properly formatted and branded error 404 page. You might even consider setting up a goal associated with a positive action a visitor may take from an error 404 page… again think about turning a negative into a positive! Goals and $index reporting both require that Pageviews be used instead of events.

5)  To take advantage of this clever addition to your standard 404 Pageview report. Using Google Analytics Pageviews also allows us to modify our error 404 Google Analytics page tag to include the additional information about the 404 error that may not be included by default. This includes: document.location.pathname + document.location.search + document.referrer as shown in the following example. This will enrich the information you have about 404 errors for troubleshooting purposes, and to provide greater ‘granularity’ if using advanced segments to isolate specific groups of visitors who have encountered an error 404 page through the same pattern of activity (navigation, browser or device, common referrer link etc. etc.).

Error 404 Tracking in Google Analytics - Code Snippet

6) To take advantage of these Google Analytics reporting features. Using Pageviews, you can also set up automated email reporting for the Webmaster, and for those responsible for monitoring the online channel. Here you will want to report on all the 404 errors the previous day, or week. Staying on top of these errors will help to fix problems quickly, to ensure the visitors experience is the best it can be. Use the top content report, and the inline filter with   ^/404   to list all the 404 errors your visitors are experiencing – and watch for spikes in this activity. Also, consider using the Google Analytics alerting feature found under ‘Intelligence’ in the Google Analytics main menu. Next, select + Create a Custom Alert as follows.*Note that for the following example you may want to choose ‘Compare to’ the ‘same day in the previous week’, to avoid the traffic effects often associated with weekends.

Custom Alerts for Error 404 Pages in Google Analytics

7) Because there really is no ‘downside’. Finally, some say that including error 404 Pageviews in your data will drive up your Pageview count and the bounce rate for your site unnecessarily. I would argue that you should strive to minimize error 404 Pageviews to the point that their effects are negligible. If they do start to skew our numbers, then fix the root cause. If you cannot do that, then consider building a separate profile in Google Analytics that will be clean of all 404 Pageviews (use a custom filter on this profile to remove all error 404 Pageview data by pattern matching against the request URI). Profiles that do not have this filter applied will capture all the Pageview activity for the above listed benefits and the profile that filters out 404 Pageviews will report the bounce rate and a Pageview count that is not impacted by error 404 Pageviews.

In a nutshell, these are the reasons why you should use Pageviews to track error 404 in Google Analytics!

Scott Shannon

Manager, Google Analytics Services
PublicInsite Web Analytics Inc.
Ottawa, Canada

Message Sent

Thank you for registering.

Cardinal Path hosted a live session to connect with you and answer all your questions on Google Analytics.
Get all the expertise and none of the consultancy fees in this not-to-be-missed, rapid-fire virtual event.

Thank you for submitting the form.

Thank you for submitting the form.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you.

Click here to download access the tool.

Message Sent

Thank you for registering.

Message Sent

Thank you.

Message Sent

Thank you.

Message Sent

Thank you

Message Sent

Thank you

Message Sent

Thank you.

Message Sent

Thank you

Message Sent

Thank you.

Message Sent

Success!
Your message was received.

Thank you.

Thank you for registering.

Cardinal Path is continuing with its series of free training. Next we are conducting training on Google Data Studio. Check it out here.

Message Sent

Thank you for registering.

Thank you for your submission.

Your request has been submitted and a rep will reach out to you shortly.

Message Sent

Thank you for your interest.

Thank you for registering.

You should receive a confirmation email from GoToWebinar with your unique webinar login information. If you do not receive this email or have trouble logging in to the event, please email asmaa.mourad@cardinalpath.com.

Thank you for subscribing!

You're now looped into the world's largest GMP resource hub!

Thank you for your submission.

Thank you for your submission.

Thank you for your submission.

Thank you for your submission.

Message Sent

Thank you for registering.

Message Sent

Thank you for your submission.

Thank you for your submission.

Message Sent

Thank you for registering.

Thank you for registering.​

Paid media spend by Government websites increased a whopping 139% YoY in 2020.

2020 Online Behavior Live Dashboard

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

2020 Online Behavior Live Dashboard

Thank you for your submission.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Success! Thank you
for reaching out.