Published April 29th, 2018 by Assaf Trafikant
Automatic 404 Report With Google Analytics
404 pages. Those pages that tell visitors that the page they were looking for no longer exists. It’s mainly a nightmare for people with websites that use multiple infrastructures, servers, CMSs, and dozens of ever-changing templates. These situations increase the chances that a page that was there one day would be gone the next and put a dent in user experience and, subsequently, business. The phrase “404 – page not found” appears on plenty of sites, but most people don’t know what that means, so in a sense, it’s jargon more than it is common knowledge. If a page on this site were to read “404”, it would be fine; for other websites, it’s best to tell the users something along the lines of “The page you were looking for no longer exists.”
On a blog with only several dozens of articles, it’s negligible, but on large sites, this is a real issue. Here’s my method for quickly creating a weekly 404 report via Google Analytics, so that you’ll be able to analyze the source of the 404 error and take care of everything on time.
Now, I know that many SEO tools do just that, but this is about analytics, right? As an alternative, you can repeat the same logic in Data Studio and have this report open all the time.
Creating a 404 report in Google Analytics, step by step
Go into your website, but this time pound out some nonexistent address – say, yourdomain.com/blabla – so that you will get directed to a 404 page.
Check out the site address: it may have stayed the same (that’s the case on this site), or it could have changed to domain.com/404 or similar.
Now, look at the name of the page you’re currently on, a.k.a Page Title. To see is, just hover over the relevant tab. Here’s what it looks like on entrepreneur.com:
As you can see, the page title is “Page Not Found..[..]”. On my site, it’s “404 – Assaf Trafikant”. To make a long story short, you should be aware of your 404-page title and URL.
Now, if you click here, you’ll import a nice 404 report into your analytics account. Here’s its structure:
- Page: I want to see the URL address for the page that came up as 404.
- Previous page path: Shows the page that preceded the 404 page, so that you can find out what led visitors there.
- Pageviews: Shows the number of times the error occurred. You can use unique pageviews instead.
- Filter: A filter that instructs Google only to show Page Titles that include the text “not found” or “404”. That’s how it is for me, but you can change it according to how your 404 page title is.
- Your report should look like this:
Now, run the report and you will see results that need tending. All that’s left is to time the report to run once a week/month and send you the aggregated data.
Timing The Report
- Run the report.
- Below the table results, set the table to show 1000 pages. Even if you have only 10.
- Above the report, click Share.
- Fill in your email address, and set the report to be sent every Sunday/Monday as an Excel sheet. The report will automatically include data from the previous week. If you chose a monthly report, you’d get data going back one month.
- Save, and you’re done!
A Couple More Things
- SEO professionals use other tools to do the same thing. There are plenty of solutions out there.
- The downside of the solution I suggest here is that it sends out a blank report if you didn’t have any 404s. If you want to get a report that’s only sent after a certain number of 404 hits has been reached, you’d have to use different tools. For large websites, I log in to Google Analytics via Supermetrics or similar, and extract every 404 hits to a Google Sheets spreadsheet; if the number of errors exceeds a set daily amount, I get an alert containing the data.