Getting overwhelmed by PostHog analytics
Choosing a privacy-friendly analytics solution and why I ended up with PostHog Cloud
One of the goals I’ve set for myself was to have basic privacy-friendly analytics installed on my technical notes site. The main reason is, obviously, to keep track of whether someone actually gets to my content. The second reason is that I’ve never actually tried to use any analytics platform to monitor my projects (also obvious, given I’ve never made anything public).
Privacy is a must. Even though I can’t guarantee that I will never use cookies to track users on my website, I will always respect your decision if you choose to opt out. This requirement basically ruled out the famous Google Analytics. I didn’t even look into it — maybe it provides some more privacy-friendly implementation, but I’m not interested. I was also set on self-hosting my analytics solution. I didn’t have any particular reason, just wanted to try it out. Given I have a VPS sitting idle and waiting for some work to do, with just Dokploy installed, I thought it was going to be an easy task.
So what was left for me? I narrowed my decision to these three solutions:
To be honest, I was already leaning toward PostHog. I’d heard about all three of them and was kind of aware that PostHog is the heaviest solution and therefore the most complex to self-host. But given that PostHog is the so-called “standard” for modern applications and is focused on developer experience, I went for it.
In my pure naivety, I logged into my Dokploy instance and went to the existing community templates. I had already deployed a more complex application using these templates (Infisical secrets manager — I’ll write about this experience in the future) and it was okay. Community templates might get obsolete if not maintained, so some tweaks are usually necessary, but I was ready for that. But surprise — no template for PostHog. Okay, no problem, let’s go to the docs. PostHog has a very nice flowchart for deciding whether to self-host or not. Obviously, the flowchart mentions a lot of risks involved in self-hosting and whether you’re willing to accept them. I was able to find my way through the chart and ended up at the “go for it” node, but… I realized I don’t have a really strong reason to self-host. The flowchart did its job, I guess! And given that PostHog’s free tier is pretty generous, I just logged into their cloud solution.
Right at the beginning of my first analytics platform experience, I felt overwhelmed. PostHog offers a ton of features, which is nice, but it’s definitely overkill for just counting the number of pseudo-unique visitors and some other metrics. However, I was able to find the right product for me (Web Analytics), and the guide for setting up the PostHog JS script in Astro was straightforward. By default, it uses cookies, but I wanted cookieless mode — and it wasn’t hard to switch to it.
I must admit that I was thinking about switching to Plausible or Umami after my first sign-in to PostHog. But I think I’m going to explore PostHog more and get more familiar with it. I’m sure it’ll be a valuable experience.