Ask HN: What do you use for analytics for a statically generated website?

16 points by tombert 18 hours ago

I recently deployed a Hugo blog that I'm locally hosting. I would like to know roughly how much traffic it's getting (almost nothing except friends right now, but I still would like some data).

Obviously I could use Google Analytics or something, but I would rather not introduce any kind of Google tracking to my site. Honestly I think I'd be happy enough with one of those "counter" things from the 90's.

Does anyone here have anything? It's been forever since I've done anything like this, I'm sure the state of the art has advanced.

stefanos82 18 hours ago

GoAccess looks interesting; to be sincere, I haven't used it myself, but the demo website looks extremely fascinating to me! https://goaccess.io/

  • gumshoe30 17 hours ago

    I use goaccess for analytics on my site. It was pretty simple to set up with nginx access logs.

wannabebarista 18 hours ago

Check out GoatCounter: https://www.goatcounter.com/.

I've used it for six years and am quite happy with it.

  • threekindwords 12 hours ago

    I highly recommend Goatcounter! It’s a reliable tool with a great free version. You can even self-host it.

  • xcircle 15 hours ago

    I also use GoatCounter for my Hugo page

reconnecting 15 hours ago

Check out tirreno: https://play.tirreno.com (admin/tirreno)

It's self-hosted, PHP/Postgresql, server-side. Plus, you can get a free tier with 1,000 API requests/month if you want to enrich data about your IP visitors. As a co-founder, I believe it's one of the most advanced solutions available. (-;

If not joking, I use tirreno for some personal websites with partly masked IP as it shows very interesting insights about bots and their behavior.

Under 90s thing you probably mean is awstats (https://github.com/eldy/awstats). CERN and many other organizations continue to use it even now.

coronapl 17 hours ago

Since you are hosting your blog on your personal server, I would just go with Mixpanel or postHog. They are quite easy to integrate and they enable you to track some more specific events that might be relevant for you.

If you ever decide to host your blog on a cloud provider, Cloudflare provides nice and simple analytics.

pixodaros 11 hours ago

Your web host should provide some options such as AWstats based on the server logs. Your host may or may not make it easy to install something else.

  • tombert 8 hours ago

    My web host is a small server in my basement with dynamic DNS.

skwee357 15 hours ago

I self host plausible. Also interested to check GoAccess once I move away from Netlify to my own VPS

kilroy123 15 hours ago

Plausible. I make sure to proxy it so extensions don't block it.

Good enough for me.

deivid 15 hours ago

I've tried goaccess and goatcounter, finally settling for umami.

DamonHD 18 hours ago

I analyse the server logs with awk + friends, filtering out obvious bots.

  • tombert 18 hours ago

    Do you have any scripts you'd be willing to share for that?

    • DamonHD 18 hours ago

      There's really nothing very exciting except I don't want to sure the bits used to keep out bots to avoid them being gamed too easily!

      The main script is ~10 key lines. If you send me contact details (eg via stuff in my bio) I could send it over to give you some ideas.

webpagealert 12 hours ago

Which Fits You? For simplicity: Use server logs + GoAccess (no code changes). For insights: Self-host Matomo (privacy-first). For a retro feel: Client-side counter (least reliable but fun).

enyosam10 18 hours ago

Did you deploy of vercel? they provide analytics as well

  • tombert 18 hours ago

    It's just a static blog being served via Nginx on my home server.