Track 404

What is the easiest way to track 404:s? I would like to track them and set up redirects for them.

1 Like

Hello!

I’ve been thinking about this -and by no means do I consider myself an expert- I would look into what things you can embed in you 404 page. Some of the themes have a specific 404 page that may or may not redirect to the main site.

I don’t know if micro.blog exposes information about what pages are served up specifically. I think we have different plugins available for analytics and those might help.

All the best

Yep, I’m with @mandaris, start using an analytics tool and keep an eye out for non-existing pages in the reports. GoatCounter is a free – for reasonable usage – and privacy-friendly alternative to Google Analytics you might want to check out.

Most tools provide a little JavaScript snippet that you install by pasting it into your blog’s footer, by going to DesignEdit Footer.

There are also services for error logging, like GlitchTip, geared more towards developers and IT persons. But those probably fail “the easiest way” requirement. :blush:

1 Like

Ok. Tried https://gunnar.goatcounter.com (open dashboard). Used a broken link from jardenberg kommenterar – 2009-09-07 – jardenberg. (look for Sidbloggen) and ends up on a 404 at my site. But all I see on goat is that my 404-page have a new hit, no refererar that would help me to understand what people are looking after.

That’s because the theme you’re using sets the preferred URL with <link rel="canonical" href="https://gunnar.se/404.html"> in the HTML of your 404 page. GoatCounter respects that metadata but you can override that by using window.goatcounter. Try pasting this right before the snippet you’ve already pasted into the footer:

<script>
  window.goatcounter = {
    path: location.pathname || '/',
  }
</script>

Sod agreed with me!!

Boom! Never going to post again!!

3 Likes

Genius!!