Over The Top SEO

OTT Blog

What’s the Best Way to Track 404 Errors?

Greg Lucas September 14, 2016

 

Tracking 404 Errors

It’s a fair and very human fact that we all love tracking positive performance trends and details of improvement. This is only one side of the coin however and it’s critical that a marketer keeps up to date with any negative themes that emerge from their reporting. As the saying goes, “a stitch in time saves nine”! Keeping your finger on the pulse in this regard will help ease your mind and avoid any catastrophic mistakes from occurring.

Keeping such a close eye on your site data will help give you more of a sense of where users are having troubles getting around your pages or understanding your content. It can give valuable insight into certain areas of your customer journey which might be falling short. 404 errors are a critical metric to keep a close eye on as it represents a direct failure of a link or page URL.

There are several techniques and angles to cover this topic from. We’ll be going over today some common methods for minimizing and measuring your 404 errors.

So what is the 404 error?

It’s likely that all of us have come across this page error at some point in our lives. What might not be so clear is what the causes of this error are. The presentation of the 404 itself can vary depending on the site with some placing further graphics or search functions within the page to aid in redirecting the user to other areas of the site that may be of use.

There are a few occurrences of the 404 error that are most common.

  • Typos – Simple. The user thinks they know the URL off by heart and doesn’t spell it correctly. A benign issue that can still be handled with the above mentioned formatting to the 404 page.
  • Links – It’s a common incident that other websites will link through to a page on your site that is either defunct or doesn’t even exist. This can be frustrating as it doesn’t reflect on your page well.
  • Old links – Separate to the above it’s commonly the case that a portion of your 404 errors will be due to outdated sites that haven’t kept their URLs up to date.
  • Internal links – It can in some cases be directly down to the owner! Sometimes problems crop up with internal links that need to be fixed in house

All well and good. How do we track them?

The easy way

You might already be able to see the path that the user has used via Google Analytics. Picking up on old articles through these page views can sometimes be the only way to get informed on dead links that are still in circulation.

If you know this is due to an error either caused by the title of by the path of the page it’s easy to create 404 errors as a goal within the Google Analytics suite. This is a common practice but does have some limitations – goals are predominantly intended to be to do with KPIs instead. You’ll also have a limit on the number of goals that you can have at a time if you aren’t ponying up for the premium version of Analytics.

A separate method you can use to keep an eye on these is to make use of the Webmaster Tools that are also provided by Google. You can use these to see what sites are linking to your 404 URLs. It can also make this information easier to digest through a range of graphs.

The downside to this information is that it is provided off the back of Google’s own crawlers. This means you can’t reliably have it included in reporting and you also won’t be able to see any details of the rest of the user’s session on your site after they experience the error.

Tag Manager

If you find yourself without access to the full Analytics or Webmaster tools then not to worry! Tag Manager can help.

You’ll need to ensure that your basic tracking of page views is arranged and that the code for the container of Tag Manager is within your 404 template.

Page headers and titles

You might find that the simplest way to track these problems is to look for what is identifying as an actual error on your website.

Usually you’ll find that the template of an error will have an unaltered page title. An example of this would be Google who have a uniform title of “Error 404 (Not Found)!!1.”

You can target these titles by using a JavaScript macro. This isn’t too difficult to do. Your first step would be capturing the title of the page by using “document.title”. This works with most browsers.

You’d then make use of a response event tag for the 404 error that would be {{the title of the page}} equals “Google example”.

Keep in mind that your rules are case sensitive. It’s a useful feature that nevertheless has left many webmasters and marketers scratching their heads if they aren’t careful!

Virtual Page views

One last method for keeping your errors in check is making use of Tag Manager once more with virtual page views. This gives you the benefit of being able to see the data under the Behaviour reports section which provides greater detail of the content. You can also use the page view with other features like a Goal Funnel – just be sure to keep in mind the above mentioned limitations.

This is easily done by making a page view tag instead of using an event tag. You just need to set the document path to start with 404/ so that it will show clearly when you later come to analysing the data within Analytics.

The firing rule for this one can be any of the above mentioned methods using the data layer or by targeting the header or page title.

Be sure to re-use this rule once done as a blocking rule when it comes to your page view tag. This will avoid corrupting your data with any duplicated hits.

Alerts

Lastly it comes down to simple best methods to use alerts for your errors. You can use event categories for your alert conditions or page that has a start with condition and value of 404. This will send through emails automatically once your errors go over a specific threshold.

Keep all these practices in mind and you’ll benefit greatly in reduction of damage to your site and brand as well as a valuable opportunity to improve your customer journey. Turning 404 errors into conversions is doable and your likelihood of retaining visitors and users will go up the more stringent you are with these methods.