Oddbean new post about | logout
 rather than upgrade google analytics to a new major version—why not instead write my own analytics library on a sunday afternoon

why not 
 @365a528d If you don't end up finishing it, I've been using Plausible and it's been lovely. 
 @365a528d Or just go for Plausible and be done with it. Unless you're a geek, of course, in which case of COURSE you're gonna write your own library because that is what geeks do. 
 @365a528d I mean, why not just ditch it. Who needs to know how many visitors you have anyway. Just guess from server side requests and write for yourself, not your stats 
 @365a528d GA4 is only 146GB of js remote loaded from a server using all of a small towns water supply to cool it, what’s the big deal? 
 @365a528d Eleventy 3.0?? 😂 
 @365a528d will you OSS it? 
 @365a528d Another person already mentioned this but I just have to second it... https://github.com/umami-software/umami is really great. You can see how I used the API on my website here: https://github.com/uncenter/uncenter.dev/blob/main/utils/umami.js 
 @365a528d eleventy-plugin-stats 
 @365a528d Let me quickly summarize why I think that's a bad idea 

(1/132) 
 @365a528d you knew https://www.awstats.org/ still exists? 
 @365a528d I had to work with Google Analytics 4 at work. It's much easier to write it for your own needs completely from scratch. 
 Well, it’s working. Can it survive a month on FaunaDB’s free tier? Only time will tell 👀

https://cdn.masto.host/fediversezachleatcom/media_attachments/files/111/165/682/546/677/808/original/6928e7a6a7883db0.png 
 @365a528d I implemented my own analytics, even managed to get it under my performance budget of 0.0kB