while it's a whole lot less signal per site, long-tail websites can provide more signal per visit than large ones. knowing you like kazakh folk music more uniquely identifies you for targeting than knowing you read cnn.
and for small sites, you don't often need a lot of data. just knowing number of visits and some basic visitor characteristics (country, time, etc.) on a per-page basis is usually as much as you need to make use of. depending on the business, a large site can and possibly should build custom analytics as a competitive advantage that doesn't have google (and facebook, amazon, etc.) looking over their shoulder.
nobody really needs GA. many don't even need realitme analytics afforded by a js library loaded on every page. you can just do log analysis, à la the original urchin analytics that google bought long ago.
[1]: https://developers.google.com/analytics/devguides/collection...
Also, to reemphasize, the primary purpose of the blog and its infrastructure is to serve my own amusement and to indulge my technical interests.
Linux VM for $3.50/month: 512 MB RAM, 1 processor core, 20 GB SSD, 1 TB/month outgoing transfer. For $5/month: 1 GB RAM, 1 processor core, 40 GB SSD, 2 TB/month outgoing transfer.
Should be enough for a hobby blog, especially if static.
They have images for Amazon Linux, two Ubuntu versions, two Debian versions, FreeBSD, OpenSUSE, and CentOS.
They also have a few images with various things preinstalled and preconfigured: WordPress; Joomla; Drupal; Django.
Might not be very helpful in your case but I'd recommend thinking about using a simpler setup than SQS Queue + Lambda, if that works for you ️
I did try to find something simpler, and I remember looking at Fathom but I don't recall off the top of my head what my qualm was. Basically anything that involves a VM is more complex than the system I described and anything that involves Docker is considerably more expensive (Fargate/ECS/EKS pricing models).
It's a little more complex, yes, but running a VPS with a few services / docker is not really that complex in the grand scheme of things. It opens you to the world of open source and/or just running long-lived processes. You also could host your site on it, removing a dependency on github offering free static hosting forever.
Browser (~3 lines of JS) -> API Gateway -> SQS Queue -> Lambda (ETLs queue into) -> Athena.
I was originally just going to use Postgres, but RDS/Aurora are expensive and running Postgres in EC2 is going to be at least as much work (configuring SSH, process management, backups, monitoring, logging, image building, networking, etc).
My custom plan is ~$3/month all-in provided I stay below ~1M requests per month, and even then it scales very cheaply. Also, this design is highly scalable, although I doubt I'll ever take advantage of it; it's mostly just icing on the cake. The main motivation is that these components are available on the free plan ("forever", not just the first 12 months) and/or the pricing model makes the charges negligible for my super-low-volume use case.
Note that this doesn't give me pretty dashboards; the interface is SQL. Fortunately, there are other analysis tools that I have at my disposal which can plug in to SQL.
Lastly, of course my $5 budget doesn't do justice to the actual value of my time; it's more of a fun challenge. If I really just wanted web analytics, I should shell out the $6/month for plausible or similar.