u/frost-echo

Neocities only keeps 7 days of stats, so I built my own archival + analytics system

Neocities only keeps 7 days of stats, so I built my own archival + analytics system

Neocities only keeps the last 7 days of traffic stats, once my site began getting more regular visitors, it was becoming harder and harder to keep track of progress my over time. I wanted to see long-term growth patterns instead of losing all historical data every week, so I wrote a small script that archives the daily hit/visit counts into a local dataset every time I update my site.

The script itself is pretty simple. Right now it's a part of my deployment script since I already update my website multiple times a day, but I also built a version for anyone to use which can be automated with a cron job to record the stats once every 24 hours. Over time it builds a permanent traffic history instead of relying on Neocities’ temporary dashboard.

Features:

  • Archives daily hits + visits permanently
  • Generates long-term traffic graphs
  • EMA-smoothed trend lines
  • Raw traffic visualization
  • Logarithmic scaling
  • Separate hits and visits tracking

Why I used EMA instead of a regular moving average:

  • Reacts faster to recent traffic changes
  • Smooths random spikes without hiding trends
  • Keeps the graph readable
  • Better for inconsistent indie-web traffic patterns (My site had a huge spike on 13th as someone linked it on hacker news, which disrupted others)

Why I used a logarithmic scale instead of a linear scale:

  • Prevents large spikes from flattening smaller data
  • Makes both low and high traffic periods readable
  • Works better for websites with fluctuating traffic
  • Lets small growth trends stay visible
  • Scales naturally as the website grows

Still improving it, but I thought other Neocities users might find it interesting.

You can find the scripts on my website's stats page: FrostEcho Stats

u/frost-echo — 3 days ago