
September 27, 2024
How to find broken links with Google Analytics 4
When you implemented tracking on your site, you likely did it so that you could see what users are doing and make improvements accordingly. As a result, your website is everchanging. However, there’s a drawback: you might forget to make some updates here and there, which can cause broken links.
These are the links on your site that lead users to other pages that no longer exist.
If you’re wondering how to find broken links with Google Analytics 4, this is the article for you. Let’s get into it!
What is a broken link?
For this article, we will consider a broken link as any link a user clicks that leads them to a non-existent page (on your website), causing a 404 error.
Note: In rare cases, some websites don’t have 404 pages; users will just be redirected to the homepage. This article will be helpful only if a website has a 404 page and its title mentions “Not found” or something similar.
You can see what this looks like on your site by inputting a non-existent URL, e.g., yourebsite.com/thispagedoesntexist.
You can go to DebugView in Google Analytics 4 (Admin > Data Display > DebugView) to check the page title that GA4 collects.
If you haven’t used DebugView before, you can download the Google Analytics Debugger Chrome extension. Once you have downloaded the extension, click to turn it on in the extension bar.
Then, go to DebugView in Google Analytics 4, click on the page_view event and under the Parameters tab, check the page_title value. The page title may or may not be different for you, so wherever I use “Page Unavailable” in this tutorial, you will want to use what comes up for your site.
If you need some more help with this, check out my article on Debugview in Google Analytics 4.
Having broken links can cause a poor user experience, leading users away from your site and potentially decreasing their chances of returning, so let’s figure out where they are and get them fixed!

Find broken link data
To find broken link data, we will create a GA4 exploration. Before we start, you need to determine what a 404 error looks like on your sitee. For this tutorial, I know that when someone inputs a URL or clicks a link that leads to a non-existent page, the page title is “Page Unavailable” (since I’m using the Google Merchandise Store sample data).
To create a new exploration, go to Explore and click “Blank”.
For the Dimensions, select Page title, Page location and Page referrer. For the Metrics, select Event count.
We will create a multiple-tab report so that you can see the data in slightly different ways.
In the first tab, double-click on the Page title, Page location, and Event count. Under the Filter section, drag over the Page title and set it to exactly match “Page Unavailable” (replace this with the page title of your site and click “Apply”.
The table of data shows you the page URLs of the unavailable pages.
While I think this is helpful, it doesn’t tell us what pages contain broken links leading to these pages. To make things easy, duplicate the existing tab.
In this tab, remove the Page location and add the Page referrer. To determine the page with the broken link, we will look at the page the user was on before landing on the 404 error.
You’ll notice that the page referrers that come up are not only from your website but also any website that led the user to that page (meaning there are broken links on 3rd party websites, too). If there are broken links on other domains, you will need to figure out how to contact the owner of the domain to change the link.
If you can’t get ahold of the website’s owner, then you can also set up a redirect on your site so that anytime a user lands on that page, they are redirected to another page. This is something you can discuss with your developers to get set up!
To just show pages on your site, drag the Page referrer to Filters and use contains or matches regex to filter by just your domain (learn more about regex here).
The table of data will show you all the pages that lead users to a page that no longer exists, which we can assume means there is a broken link on that page!
What to do now?
What should you do now that you know how to find broken links in GA4? First, fix the issue, and second, minimize the chances of it occurring again.

Fixing broken links
First and most obviously, you need to fix these broken links. You want to ensure a smooth user experience, so this should be your priority now.
Depending on how your site is set up, you may be able to fix the links yourself (if you’re using a website building tool like Wix), or you will need to work with developers to have them fix the links. This may take some trial and error as the page could have multiple links.
As mentioned above, for those links coming from 3rd party sites, you can enable a redirect (if it is not possible to get the website’s owner to change the link). If a certain page on your site is deleted, but there are still links out there somewhere leading to it, it makes more sense to redirect that page’s URL to another related page (if possible). This would be a better experience than showing a 404 error.
Auditing
It’s good to make a habit of auditing your GA4 properties to ensure there aren’t any tracking issues. One new step you can add to your audit checklist is to refer back to the report we made above regularly and update the date range to see if there are any new broken links.
Find broken links with Google Analytics 4: Final words
Broken links can cause a real damper on user experience, so it’s important to keep on top of them. With Google Analytics 4, you can use explorations to find these broken links and then work with developers (if needed) to update them to the right links.
While it takes time, it’s worth it! If you have any other tips for keeping track of broken links, share them in the comments below.
1 COMMENT
Thanks for this article. It was really helpful!
I built the report you described and noticed something: I’m seeing 404 links coming from Instagram, but when I crawl my site with Screaming Frog, no 404s appear.
Is there a way to get more detailed information from this report to understand what’s happening?