How to Find Broken Links with Google Analytics

Cody Schneider

A user clicking a link on your website only to be met with a "404 Not Found" error is a digital dead end. It’s a frustrating experience that can damage your site's reputation and search engine rankings. This article will show you exactly how to use Google Analytics to hunt down these broken links so you can fix them for good.

Why Broken Links Need Your Immediate Attention

Broken links, or 404 errors, aren’t just a minor annoyance, they create real problems for your visitors and your business. Understanding their impact is the first step toward prioritizing a fix.

  • Poor User Experience: The most immediate issue is user frustration. When someone is looking for information and hits a 404 page, their journey is abruptly halted. This can cause them to bounce from your site and seek answers from a competitor, likely never to return.

  • Negative SEO Impact: Search engine crawlers, like Googlebot, follow links to discover and index content on your site. When they constantly encounter 404 errors, it sends a signal that your site is poorly maintained. This can waste your "crawl budget" (the number of pages a search engine will crawl in a given period) and dilute link equity - the value passed from one page to another through hyperlinks.

  • Lost Conversions and Revenue: If a broken link points to a product page, a service landing page, or a sign-up form, you're directly losing out on potential sales and leads. Every visitor who hits that 404 is a missed opportunity.

How to Find 404 Errors with Google Analytics 4 (the Simple Way)

Unlike its predecessor (Universal Analytics), Google Analytics 4 doesn't have a default report for 404 errors. Not to worry - creating your own is an easy process. The trick is to filter your page reports by the title of your website's error page.

Step 1: Find Your Site's 404 Page Title

Before you even open GA4, you need to know what to look for. Your website's 404 error page will have a specific title that appears in the browser tab. To find it, simply navigate to a URL on your domain that you know doesn't exist, like www.yourwebsite.com/gibberish-test. Look at the title on your browser tab. Common examples include "Page not found," "404 Error," or something more custom. Jot this down exactly as you see it.

Step 2: Navigate to the Pages and Screens Report in GA4

Now, log in to your Google Analytics 4 property. In the left-hand navigation menu, follow this path:

  1. Click on Reports.

  2. Go to the Engagement section.

  3. Select Pages and screens.

This report will show you every page on your website that has received traffic. Now, let's filter it to show only your error pages.

Step 3: Filter by Your 404 Page Title

At the top of the reporting table, click the Add filter button.

  • In the "Dimension" dropdown, search for and select Page title.

  • For "Match Type," you can use contains or exactly matches. Using "contains" is often safer.

  • In the "Value" field, type in the exact page title you found in Step 1 (e.g., "Page not found").

  • Click the blue Apply button.

Step 4: Identify the Broken URLs

After applying the filter, the report is transformed into a list of broken URLs. The first column in the report will be Page path and screen class. These are the actual broken links a user tried to visit to trigger the 404 error. The Views column shows you how many times each specific broken link was hit. You now have a prioritized list of broken links to tackle. Start with the ones that have the highest number of views, as they’re causing the most disruption for your visitors.

Advanced Method: Proactive 404 Tracking with Google Tag Manager

While the filtering method works well, setting it up every time can be a tedious process. For a more robust and automated solution, you can configure Google Tag Manager (GTM) to fire a custom GA4 event whenever a visitor lands on a 404 page. This turns 404 errors into a trackable event you can easily report on.

Step 1: Create a Trigger in GTM for 404 Pages

Your trigger tells GTM when to fire a tag. In this case, we want it to fire only when someone is viewing a 404 page.

  1. In your GTM container, navigate to Triggers and click New.

  2. Give your trigger a name, like "404 Page View Trigger".

  3. Click on "Trigger Configuration" and select Page View as the trigger type.

  4. Under "This trigger fires on," select Some Page Views.

  5. Set the firing conditions to: Page Title | contains | Page not found (or whatever your 404 page title is).

  6. Click Save.

Step 2: Create a GA4 Event Tag in GTM

Next, you’ll create the tag that sends the event data to GA4 when the trigger is activated.

  1. Go to Tags and click New.

  2. Name your tag, for example, "GA4 Event - 404 Error".

  3. Click on "Tag Configuration" and select Google Analytics: GA4 Event.

  4. Select your main GA4 Configuration Tag from the dropdown.

  5. For the Event Name, enter a descriptive name in snake_case, like error_404.

  6. To record the broken URL itself, expand "Event Parameters" and add a new row:

    • Parameter Name: broken_url_path

    • Value: {{Page Path}} (This is a built-in GTM variable that captures the URL path).

  7. Under "Firing Triggers," select the "404 Page View Trigger" you just created.

  8. Click Save.

Once you've created both the trigger and the tag, use GTM's Preview mode to test it. Then, submit and publish your changes.

Step 3: Register a Custom Dimension in GA4

For GA4 to understand and report on the broken_url_path parameter you're sending, you must register it as a custom dimension.

  1. In GA4, go to Admin > Data display > Custom definitions.

  2. Click Create custom dimensions.

  3. Fill out the fields:

    • Dimension name: Broken URL Path

    • Scope: Event

    • Description: The URL path that triggered a 404 error.

    • Event parameter: broken_url_path (this must match the parameter name from your GTM tag exactly).

  4. Click Save.

After 24-48 hours, data will begin populating. You can then navigate to Reports > Engagement > Events, click on your error_404 event, and add your new "Broken URL Path" dimension to see a clean report of all your site's 404 errors.

You've Found Your Broken Links – Now What?

Finding the errors is only half the battle. Now you need to fix them. Your course of action depends on the broken link's context.

  • For Internal Links: The most common and highest-priority fix is the 301 redirect. A 301 redirect permanently sends both users and search engine crawlers from the broken URL to the most relevant live page. This preserves link equity and ensures a smooth user journey. Most platforms and website frameworks (like WordPress) have plugins or built-in tools to manage redirects.

  • Update Links at the Source: If you find a broken link on another page of your own site, go to that source and update the link to point to the correct URL. This is a cleaner, more direct fix than relying on a redirect.

  • For External Links (Link Reclamation): What if another website is linking to a page on your site that no longer exists? This is a great opportunity. After implementing a 301 redirect, you can reach out to the other website's owner and politely ask them to update the link. This reclaims a valuable backlink and improves everyone's experience.

Final Thoughts

Regularly monitoring and fixing 404 errors is a critical part of website maintenance. Using Google Analytics provides a free and powerful way to diagnose these issues, helping you improve site health, defend your SEO rankings, and most importantly, give your users the clean, frictionless experience they expect.

Manually creating filters and configuring custom event tracking can be powerful but also time-consuming, especially when you need answers fast. At Graphed, we built our AI data analyst to eliminate this friction. After connecting your Google Analytics account, you can skip the setup and just ask a question in plain English, like, "Show me my top 10 most visited broken URLs from last month," and get an instant, easy-to-read report. This gives you more time to focus on fixing problems, not just digging through data to find them.