VKI Studios is now Cardinal Path! www.CardinalPath.com
Learn more about Cardinal Path

Fixing your 404 Errors with Google Analytics - The complete Guide

So we've written before about how important it is to fix your 404 errors, and how you can track and trace them with the help of Google Analytics. Doing so is important, as beyond just producing a bad user experience, any links pointing at a dead page is a link wasted. Fortunately, the tools to analyze your error pages are readily available to anyone who has Google Analytics installed. 

In this post I want to guide you through the complete process of setting up your Google Analytics to track error 404's, and then using it to determine how to fix each.

The Setup

Tracking your Error Pages

First you need to be sure that the Google Analytics tracking code has been installed on your Error404 pages. After you've done that, go into your profile settings and setup the following filter:

Filter Type: Advanced
Field A -> Extract A | Page Title | (Error [0-9][0-9][0-9].+)
Field B -> Extract B | Request URI | (.*)
Output To -> Constructor | Request URI | $A1$B1
Field A Required: Yes
Field B Required: Yes
Override Output Field: Yes
Case Sensitive: No

This simply takes the title of the page and the requested URI and combined them, outputting over the requested URI string.

Displaying Full Referrers

Setup another filter. This time:

Custom Filter
Advanced
Field A -> Extract A: Referral (.*)
Field B -> Extract B:
Output To -> Constructor: User Defined $A1
Field A Required: Y
Field B Required: N
Override Output Field: Y
Case Sensitive: N

This should let you see the full referring source for a URL by displaying the User Defined Value for that page.

The Report

Give it some time for visitors to hit error pages. Now you should be able to go into top content and filter by your error code (in this case 404). This should bring up a list of errors, including what page they user was trying to reach.

Now click where it says medium (on yours it might say "none") and bring up user defined values. This should now tell you the exact URL that the visitor came from.

Fixing the errors

Just telling some one that their link to you leads to a dead page can be a little hit and miss, especially when the links come form sources without a single webmaster to pester (say, social media). However, with this combination of page and source you can both find what exact page the link to you is on, letting you find specific subpages. Further, since you know where it's pointing, easing the webmasters job and increasing your potential for success. 

Of course, some times you wont want to just contact every webmaster, and there are other options you can take for that:

  • Are you seeing that a link to a missing page sending a lot of visitors? Maybe you don't want to 301 that page, but rather contact the webmaster and have them change their link to point to the proper page. 
  • Have moved content that's hasn't been registered as a 404 in Google (so there's still search query data attached to that visitor)? 301 that page to match what they're searching for.
  • Have a bunch of users going to a URL that doesn't exist, but is a close match to one that does? 301 it to that URL. I have to guiltily admit that for some reason we still haven't 301ed vkistudios.com/blog to blog.vkistudios.com.
  • Are people visiting a page that doesn't even resemble anything on your site (this happens more frequently than you might think)? Use a 404 error page with some top results and a nice big search bar.
  • Is a major site with high trust linking to a page that doesn't exist? Ask them to relink, and if they don't respond: 301 it.
  • Are a bunch of decent quality sites linking to a page that doesn't exist, but not sending a whole lot of visitors? 301 it, saving you the effort of contacting every page.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Kent, this is great - it's so important to track broken links back to their source - imagine 404 errors in response to Paid advertising!!!

Everyone with a site needs to do this tracking and analysis and the following question should not distract readers from doing that - they are likely leaving money on the table.

However, there is another problem I want to introduce to our readers. Do you have landing pages that exist that are not being tracked and Traffic Sources are being lost? I bet you do and not for the most obvious reason!

We will begin addressing that issue and its solution in my next post. But readers will need to subscribe ...
# Posted By Brian Katz | 1/14/11 11:04 AM
One item that wasn't mentioned, is that when you are tagging your error 404 pages, check that the Title tag is something that actually identifies it as an Error 404 page.

Something as simple as: Error 404

This will ensure that the filter that appends this to the page URI is actually adding something meaningful and easy to filter upon.
# Posted By Dave Eckman | 1/17/11 4:39 PM
.