Readit News logoReadit News
Posted by u/tombert a year ago
Ask HN: What do you use for analytics for a statically generated website?
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 · a year 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 · a year ago
I use goaccess for analytics on my site. It was pretty simple to set up with nginx access logs.
joshyi · a year ago
We use it on our site, which handles around 100M requests per month, works really nice. In fact, we have a screen in the office that continuously displays the stats, quite nifty!
wannabebarista · a year ago
Check out GoatCounter: https://www.goatcounter.com/.

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

threekindwords · a year ago
I highly recommend Goatcounter! It’s a reliable tool with a great free version. You can even self-host it.
xcircle · a year ago
I also use GoatCounter for my Hugo page
XCSme · a year ago
Probably not exactly what you're looking for (if you only want basic stats), but I made a self-hosted platform: https://uxwizz.com

It's built on the LAMP stack, so you'll also have access to the data from all your websites in a MySQL database.

You can enable/disable specific static features. Fun fact: if you want session recordings, it comes with a unique "lightweight" session recording mode that is specifically built for statically generated websites. That version only stores minimal data, without storing the content on the webpage.

I think the coolest feature is the multi-domain tracking, so you can see stats for all your websites on one page, and even apply filters to it (e.g. see for all websites traffic from Google vs HN).

coronapl · a year 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.

reconnecting · a year 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.

Dead Comment

mobilio · a year ago
tombert · a year ago
Oh! I didn't know Cloudflare had a free analytics service.

That's probably the easiest thing while not adding Google to my stack.

pixodaros · a year 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 · a year ago
My web host is a small server in my basement with dynamic DNS.
skwee357 · a year ago
I self host plausible. Also interested to check GoAccess once I move away from Netlify to my own VPS