5 ms·
Show HN: I built an opensource, privacy-first Google Analytics
- blaumaus 5y agoFor quite a long time I've been using mostly open-source utilities. And for some time I also wanted to create some kind of utility of my own and to contribute into the open source world. One year ago, in April, I had an idea to create my own web analytics service, which would be much more private and provide alternative functionality of Google Analytics. Meet Swetrix - a completely opensource, cookieless, self-hosted and privacy-focused web analytics platform. This service allows you to track many different metrics such as user country, device type, browser, and more. Apply filters to the data, extensively customise your tracking options and your website settings. Feel free to check out our live demo! :) The API is written in NestJS, as databases I use MySQL, Redis and Clickhouse. Frontend (and the browser extensions) are written in React. I learnt a lot about analytics and coding while working on this project!
- phillipseamore 5y agoWhat I find missing from all the OSS analytics is log parsing agents that I can install on my servers for sites that I don't want to have JS on. The agent would parse the logs periodically (every hour from cron or whatever) and send the parsed/analyzed data to the server handling analytics. This could also augment data for sites that primarily use a JS tracker by adding information on users that have JS disabled (or users on such a bad connection that they leave before the load finishes) as well as bots, uptime checkers etc.
- blaumaus 5y agoActually this sounds reasonable to add, I added this feature to my backlog, it won't be too hard to implement it. By the way, as for now we also support no-JS tracking via 1x1 px GIF.
- sdoering 5y agoYou might take a look at GoAccess [0]. > GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser. [0]: https://goaccess.io/ https://goaccess.io/
- ignasv 5y agoHow are MySQL, Redis and Clickhouse used? Which usecase each of them cover?
- blaumaus 5y agoMySQL is used for data like user accounts and linked websites. Clickhouse is used for the analytics data (which this DBMS is basically designed for). Redis is used for caching (for example, I store there all the incoming analytics requests, and each minute the cron job takes them all and adds into the Clickhouse DB, as a big chunk), rate limiting, etc.
- coolhoody 5y agoKeep an eye on your commercial competitors (Plausible, Fathom) and adjust your paid plans to get an edge.
- blaumaus 5y agoSure, by the way the prices are roughly the same. I also try to outcompete them by working on unique features
- coolhoody 5y agoThe 500k plan: • You: 20 sites = $59. • Plausible: 50 sites = $49 (2 months free if yearly). • Fathom: 50 sites = $44 (2 months free if yearly). As you can see, they keep eyes on each other. Hence my advice. Startups are, in essence, lemonade stands wars. Must keep an eye on the tags and look cute. Don't do 'roughly', research everything that matters. If you settle for 'roughly' — you'd miss, for example, that Plausible is giving back 5% of gross revenue to charitable causes, and Fathom is giving back 2%. Now — whose stand looks cuter? I know the time is limited, but learning everything possible about the competition is a top priority — above the actual development.
- blaumaus 5y agoThanks for sharing this advice
- jpolidor 5y agosigned up and trying this for my blog. I was looking for a solution which allows to understand which posts in my blog are more interesting, with a reasonable free plan and privacy focused
- blaumaus 5y agoHappy to hear that you signed up and started using it! Contact me in case you have any questions regarding the service:)
- adriangrigore 5y agoI'm parsing logs with awk https://s.mkws.sh https://s.mkws.sh.
- blaumaus 5y agoThanks for sharing it. I'll implement a similar log based tracking for Swetrix too.
- the_common_man 5y agoare there any instructions for self-hosting?
- blaumaus 5y agoYes, you can selfhost it as a docker image (docter compose available too) or simply clone the Github repo. The instructions for selfhosting are at https://github.com/swetrix/swetrix-api https://github.com/swetrix/swetrix-api
- dspillett 5y agoHow does this compare to other projects with similar aims (such as Plausible)? Specifically I'd be interested to know if there are self-hosting instructions or if this is not really a supported configuration (not that it is supported as such by many projects, with any real promise of support, but it is at least assisted with install action instructions). Asking mainly as I might be bringing some bits & bobs online in the coming months, and I'm considering a local install of Plausible for analytics.
- blaumaus 5y agoCompared to Plausible, we provide the same functionality + Swetrix browser extensions (soon the alerts will be added there), email reports, multiple languages and themes support and for sure a free tier. Swetrix is fully open-source and you can selfhost it via Docker (Docker Compose is available too!). See the instructions at https://github.com/swetrix/swetrix-api https://github.com/swetrix/swetrix-api
- FalconSensei 5y agoAfter a quick look, I already loved that you offer a free band for up to 5k events. Many GA alternatives don't have free plans, and their first band is expensive for a hobby blog that gets like 100 views a month.
- blaumaus 5y agoYep, I also noticed that and that's why I decided to add free plan to my service:)
- western_ant 5y agoAmazing tool, btw
- blaumaus 5y agoThanks
- western_ant 5y agoAmazing tool, btw. It's like a google analytics, but much better
- deleted 5y ago[deleted]