-
Weatherly
Since remaking a site, we’ve been hit with a lot of 404. It looks like we could track them by the URL if we had it. But there doesn’t seem to be a URL for the page when its made in Element and set to generate_do_template_part and location as 404 template.
Is there a way to find or assign a URL to this that Google Analytics can see? Right now we have no way of knowing what needs a redirect.
-
-
Weatherly
No. Its a non existent URL. I was just looking for something that wouldn’t veer onto a real page. What you see popping up is a Custom 404 set up in a 404 template Element But that is the point, really. It shows the URL that doesn’t really exist instead of https://yourdomain.org/404 and that makes it impossible to track which URL no longer exist and are being hit.
-
George
Hello.
Just to clear things up: a Custom 404 set up as a 404 template Element is simply the content that gets displayed when a non-existent URL is hit. It doesn’t have its own URL – the browser address bar keeps showing the broken URL (like /maz), which is actually what you want for tracking purposes.
Google Analytics can track 404s from real visitors – since the URL stays as
/maz, GA4 records that path. To find these:In GA4: Go to Reports → Engagement → Pages and screens, then filter by your 404 page title (whatever title your 404 Element has). This will show the broken URLs that triggered it.
Google Search Console is often more useful for this: Go to Indexing → Pages, then scroll down to “Why pages aren’t indexed” and look for “Not found (404)”. This shows URLs that Googlebot encountered as 404s.
However, keep in mind that many 404s are caused by bots probing for vulnerabilities (random paths like
/.env,/wp-admin.php, etc.). These won’t appear in GA since bots don’t execute JavaScript, and they won’t show in Search Console either unless it’s specifically Googlebot. For the complete picture, you’d need to check your server access logs. -
Weatherly
The problem is that it’s either not being tracked or it is being tracked but not registering the page title. I have compared this site to other client sites that are not using the GP Hook Element for the 404 template. I have no problem finding the ‘Page Not Found’ in the GA4 reports for any other clients.
For this client, I have checked GA4 reports and searched for this page title multiple ways. It simply does not appear at all — even though I know I have accessed the 404 page many many times while testing. This is preventing us from getting info about what people were looking for (bots or humans).
All I know for sure is that the Engagement Overview for this client is telling us ‘Page Not Found’ is the 3rd most visited page on the site! I believe that something didn’t get a proper 301 when we launched the new site, and I desperately need a way to identify the source of all these hits.
Here are some screenshots to show what I mean.
Screenshot one
Screenshot two
Screenshot threeHere is a comparison screenshot from a different site.
-
George
Could it be that there is a plugin that redirects the default login page to a 404 page, or similar?
-
Weatherly
No. No redirect plugins at all. And it isn’t the login page we are talking about.
-
I have compared this site to other client sites that are not using the GP Hook Element for the 404 template. I have no problem finding the ‘Page Not Found’ in the GA4 reports for any other clients.
Can you disable the GP element for the 404 template and confirm the problem is gone after doing that?
Although it’s unlikely caused by the 404 template, as it simply just injects your content as the template, it cannot change URL or anything related to URL/permalinks.
- You must be logged in to reply to this topic.