We had a series of posts on ‘Error 404 Page’. I thought of completing the series with a post on how to track error 404 pages and broken links in Google Analytics.
To track the error 404 pages in our site we will be using an advanced filter in Google analytics. Before we set up our advanced filter in Google analytics ensure Google analytics tracking code is present in the error page or you will not be able to track the required details. Make sure that title tags of error pages are consistent. For example in this case the title tag can be ‘Error 404 Page’.
Advanced Filter Set Up
Login to your Google Analytics account. In analytics settings page click on to ‘Filter Manager’. Now click on the ‘Add Filter’ link. You will be taken to the page ‘Create New Filter’. Now use the below mentioned details to set the filter.
Filter Type: AdvancedField A -> Extract A Page Title (Error [0-9][0-9][0-9].+)Field B -> Extract B Request URI (.*)Output To -> Constructor Request URI $A1$B1Field A Required: YesField B Required: YesOverride Ouput Field: YesCase Sensitive: No
Once you have finished with setting up the filter with the above details the page will look similar to the image given below. Save it by clicking on ‘Save Changes’. We had created the advanced filter to track Error 404 pages in our site.
Error Pages Report
Now to create the error page report go to the Top Content report and filter by the term ‘Error’ (Our title tag of the error page contains ‘Error 404 Page’). This will return with all the error pages present in our site. This means, the visitors are lead to the Error page on searching for the URL’s mentioned in the report. Sample of the report is given below.
Tracking Broken Links
We got a report with list of Error pages present in the site. Now the main part is to find out the page where these links are present and to correct it. Broken links can be from our own site or from the some other websites. To find out the pages where the broken links are present, click on the error page given in the list, where you will be taken to ‘Content Details’ page. In this page select ‘Navigation Summary’ under the drop down menu ‘Content Details’. You will get the details of the previous pages before visiting our error 404 page. A sample of the report is given below.
Check these pages and search for the broken links present in it. Correct these errors. By removing these broken links we can reduce the unsatisfied customer who receives error 404 page on clicking these broken links.