Can i keep a log for 404 not found pages?

Hi,

Can i keep a log for 404 not found pages?

Like that pattern:

date - url -how many time

1 Like

You should be able to use Google Analytics to get that info.

1 Like

I am already use Analytics. I should get the info on Analytics panel, right?

No – if you’re using GA you get that data directly from the GA interface, rather than through the Discourse UI.

Edit: I made an assumption about what you meant by the Analytics panel.

1 Like

It’s not that easy to be honest.

You need to either make a custom javascript file to check if “Oops! That page doesn’t exist or is private.” exists, or change the 404 template to fire an event. So no, this is not out of the box and also it’s a bit fragile.

I would agree that this feature is useful; especially in the days directly after a migration.

6 Likes

We’re about to customize our 404 page using tips from: "That page doesn't exist or is private" restyling with CSS

Is the information in this topic still relevant?

  • that there’s no way to do log this in discourse
  • that GA still makes it hard to track 404s out of the box

I don’t believe this has changed.

One way that might make it easier to track in Google Analytics is if we update the page title to something like 404 not found - forum name — In GA you can create a custom report that filters for page title without any custom JS or events.

3 Likes

Is there a way to update page title for 404 pages?

Any text in Discourse can be customized. In your case you will have to change the page_not_found.title from /admin/customize/site_texts/page_not_found.title

1 Like

Sorry, I’m referring to the page title in head section that appears on browser tab. I couldn’t find any related text customization for that.