Do you want to find and fix broken links on your site?
To provide an excellent user experience to your visitors, you need to regularly monitor your website for broken links or 404 error pages.
And with Google Analytics, you can easily track them.
In this article, we’ll show you how to find and fix broken links with Google Analytics. Let’s start…
What are Broken Links?
Broken links are links that no longer exist. So, when you try to visit a page that isn’t there anymore, you’ll see an error.
Now, the most common error message you’ll notice will the 404 error. But depending on the browser you’re using, you’ll see messages like Bad Host, Bad URL, Timeout, or The webpage cannot be found.
So, what causes a broken link?
There could be several reasons why you might come across a link to break, such as…
- A website closed down and is no longer available
- The URL of a webpage changed
- The webpage was moved to another location
How Do Broken Links Affect Your Website
At this point, you might be thinking, why is it important to track broken links and how do they impact your website?
Below are a couple of reasons why you need to fix 404 errors or broken links on your website.
- Bad User experience: 404 errors cause a negative user experience to your visitors because they won’t find what they expected.
- Negatively Impact Your Site’s SEO: Search engine bots can’t crawl the right content on your site. If you have too many broken links on your site, they can even sabotage your reputation and negatively impact on your search traffic.
- Drop Your Keyword Rankings: Since search engines can’t find your webpages due to broken links, your keyword rankings can fall. As a result, you’ll lose your organic traffic.
- Lost Customers and Sales: With people not being able to find what they’re looking, you could be losing potential customers and sales.
Now let’s see how you can find all 404 errors on your website using Google Analytics.
How to Track Broken Links in Google Analytics
To track your broken links in Google Analytics, you have 2 options. First, you can use a WordPress plugin like MonsterInsights. It automatically tags 404 pages for you, so you don’t have to make any additional configuration on your plugin.
Second, you can manually create a custom report in Google Analytics to report 404 errors on your website. This method is far more complicated and difficult. Plus, you’ll need to know your way around Analytics and understand how it’s advanced filters work.
1. Use MonsterInsigths to Track 404 Errors (Easy Way)
Let’s look at the first and the easiest way of tracking broken links in Google Analytics.
MonsterInsights is the best WordPress plugin for Google Analytics. You can set up Analytics on your website without editing code.
Besides that, MonsterInsights automatically sets up advanced tracking that’s not possible by default in Google Analytics.
You get access to features like:
To get started, simply install and activate MonsterInsights on your website. Then connect Google Analytics with your WordPress site.
And that’s it! MonsterInsights will now track all your broken links or 404 errors in Google Analytics.
To find your 404 error pages, all you need to do is log in to your Analytics account and then go to Behavior » Site Content » Content Drilldown and look for 404.html.
In most cases, you’ll find URLs like this:
You can find that the above URL is structured in a neat way so you can get a clue about the error and how to fix it. Here is how you need to analyze your 404 errors in your Google Analytics account.
- The 404 error URL is shown after the ?page= query. In the above example, the 404 error URL is http://example.com/error-page-url-slug/
- The error URL is linked from the page that comes after the &from= In our example, the error page was linked from http://example.com/page/.
2. Create a Custom Report in Google Analytics (Difficult Way)
While MonsterInsights saves time and lets you focus on growing your website, you can also track broken links by creating a custom report in Google Analytics.
However, do note that it’s a complicated way and you need to have an exact title for your broken link pages. Otherwise, Google Analytics might have difficulty tracking your 404 errors.
To begin, go to Google Analytics and then navigate to Customization » Custom Reports. Now click on + New Custom Report.
Next, you’ll have to give a name to your report, like Broken Links Report. And then enter the following settings:
- Change the Type to Flat Table
- For Dimensions, add Landing Page and then Full Referrer
- For Metrics, search and add Entrances
- Then in the Filters, click add filter and select Page Title (make sure the first dropdown is set to Include and the next is set to Exact)
- Enter the exact title of your broken link, such as Page not found or 404.html
- Select All views associated with this account under Views
- Click Save when you’re done
How to Fix 404 Errors in WordPress
Now that you know how to find broken links using Google Analytics, here are some tips on how to fix them.
1. Find Your Source URL and Fix It
Using the above step, you can easily find your broken links using Google Analytics. You can use this info to go to the source page where the broken link was included and update the link and fix it.
2. Set Up 301 Redirection
If you’ve recently edited your URL slug or changed the location of a webpage, chances are you’ll find tons of 404 error messages in Google Analytics. To fix them, you can set up 301 redirections and point the user in the right direction.
3. Look for Errors and Typos
At times, broken links are caused because of small errors like a spelling mistake or an additional character in the URL. Use the data from Google Analytics to highlight these links and then redirect them to the correct URL.
We hope this guide helped you to find and fix a broken link with Google Analytics. If you want to increase search engine traffic to your site, you can follow these 4 SEO tactics.