Finding 404 pages that actually get visits with GA4
Broken pages that lead to a 404 error page can lead to a poor customer experience and damage your SEO. Usually, I recommend Google Search Console to find which pages are broken and lead to a 404 page.
This is only part of the story.
Search Console is a bit misleading. It only shows what the crawlers found, they don't show which pages get visits from customers.
Both pieces of this story, Google and your customers, are important. Yet, you'll need to find those broken URLs in different ways.
Google Search Console
The first is handling what Google sees and resolving those 404 pages.
In Google Search Console, navigate to Indexing on the left sidebar and select Pages.
Then you'll see a list of reasons Why pages aren't indexed. Select Not found (404).
These are all links that Google at one point saw, but no longer lead to a valid URL.
Google Analytics 4
The second is handling what your customers experience.
This is the real-life experience your customers are having. This means they clicked on a link to take them to a page and they instead see a 404 error page.
Of course, we don't want Google to land on broken links as that hurts our SEO. But customers landing on broken links impacts the bottom line... sales!
Google Analytics can show you the number of visits and when.
Most Shopify stores have a default 404-page title of "404 not found". If you've customized your page title, you'll want to search for that instead.
- Go to Reports -> Engagement -> Pages and Screens.
- Select Page title and screen class.
- Enter "404 not found"
- Then add the field for Page path and screen class.
If you have results, you should see something similar to the image below. The page title of 404 Not Found, the path to the URL, and then your metrics for views, users, and more. If you don't see anything, try changing your date range.
If you still see nothing, you may not have anyone visiting your broken pages. Congrats!
Resolve broken links to 404 pages in Shopify
Once you know which pages both Google and your customers see as broken links, you'll want to resolve them.
You can add the URL redirects to Shopify by going to Online Store -> Navigation -> View URL redirects.
If there are a lot of pages that need to be resolved, use Shopify's built-in bulk import for redirects.
Archiving or deleting products and collections is the #1 cause of broken URLs on Shopify stores. Get ahead of 404 issues by creating redirects right away.
Or avoid broken links altogether by keeping your discontinued products and collections live on the site. Then it's as simple as linking to an alternative.