Hacker News new | ask | show | jobs
Using analytics on my website (azan-n.com)
41 points by azan-n 914 days ago
9 comments

Hi HN, PostHog employee here. I'm working on our Web Analytics product, which is currently in beta. It's fun to see us mentioned here :)

I should mention that we have a ton of SDKs (see https://posthog.com/docs/libraries) for back end frameworks and languages, so if you wanted to use PostHog without any client-side JS you could send pageviews and other events manually, but for the vast majority of people it makes more sense to use our JS snippet.

Hijacking this comment to share the roadmap for web analytics https://github.com/PostHog/posthog/issues/18547. It's very much in the launch-early-and-be-embarassed phase, but I would love to hear any feedback or suggestions that people have, particularly if you're already a PostHog user.

Hello there. Thanks for taking the time to read this.

I figured I could use PostHog on a server as well but if I was doing that anyway, I'd probably use something better suited for the use-case instead of PostHog. I did notice the Web Analytics feature and turned the toggle on for my workplace but I haven't gotten around to using it and haven't heard about it from my team either. Will get back to you if I have anything to share. Cheers.

If you already use Posthog, Web Analytics has been in Public Beta for quite some time.[1]

If I remember correctly, CloudFlare Analytics does not need you to register your domain with them. I personally feel keeping domain registration coupled with your DNS provider is not a good idea.

Plausible[2] has an Open Source self-hostable version but is not so updated in sync with their SaaS version.

Umami[3] is another simple, clean one. And, of course, as many have suggested, Matomo is the other well-established one. If you want to avoid maintaining a hosting routine, a lot do the hosting out of the box these days. PikaPods[4] was good when I tried and played around for a while.

1. https://posthog.com/docs/web-analytics

2. https://github.com/plausible/analytics

3. https://umami.is

4. https://www.pikapods.com

I feel like the blog post confused domain registration and DNS on the root domain. CloudFlare absolutely demands the latter by asking you to change your name server on your root domain. The only way out is on the enterprise plan.
Correct. Thanks for pointing that out, I might not have mentioned it correctly in my post.
I suggest using analytics that you can self-host, like https://www.goatcounter.com/ and renting a cheap vm to run it on along with your blog. It is way better, you have more control and you can be sure that javascript tracking is working for 100% of people using the site since you have full control over it not getting blocked by adblockers.
I use Google Analytics (I know, I know, it's bad, sorry for that, but I tried Matomo and it didn't work for me). I noticed in recent years the amount of visitors got down by a lot. Would it be possible to know that the reason is because the users are blocking Analytics JS?

To compare, my website gets around 600 visitors per day according to Analytics, while Cloudflare says something around 4k. Who should I trust?

Also, if Cloudflare would add visitors per page, I would completely remove Analytics. I only want to know visitors per day, country, and the most visited webpages. That's more than enough.

Could you share why you didn't like Matomo? I am building UXWizz, a Matomo alternative, that is focused only on self-hosting. What parts of Matomo made you stop using it?
Yeah I suspect a lot of that has to do with ad blocking and the problem with using log based analytics is filtering out bot traffic
I agree. With PostHog, I know that my ad-blocker will blocks the URL rendering the service useless, but I set up a reverse proxy using Cloudflare Workers to prevent ad-blockers from blocking it.
JS analytics are increasingly susceptible to inaccuracies as data manipulation methods multiply, leading to the production of unreliable events from JavaScript endpoints. Staying abreast of industry developments highlights a rising trend of blockers leveraging AI-driven detection, reducing the significance of JavaScript analytics in such situations.
I can understand the need for analytics on an advertising-supported site with >1M DAU, on a complex web application.

But anything smaller than that and analytics are mostly vanity metrics. A lot of the traffic is going to be bots anyway.

Write for pleasure. If you must, look for qualitative signals like discussions of the article on HN or Twitter.

> But anything smaller than that and analytics are mostly vanity metrics

I removed any analytics from my blog because I'm already obsessed enough with silly star counts. It manages to completely suck away all the joy; ignorance is bliss here. I found that the rare email or comment from some random person saying that they found something useful is much more fulfilling and at the same time less invasive of my brain activity.

I don't use analytics on my personal sites for vanity metrics. I use it to see where people are coming to my site from and the stuff they seem to resonate with.
Upon a bit of introspection I found that for me, such things were just ways of stroking my ego. I just find it liberating to not really care or give much thought about what my audience cares about or who they are. I write first and foremost for myself, second to help others and third to have something to show to prospective employers.

What those metrics mean to oneself is different for everybody. Also, being a vanity metric and being useful are not mutually exclusive either.

I like to know where my users are coming from and discussing what I wrote so I can engage them and have discussions with them too.

Not saying ignoring all that is bad, just my reasons for wanting analytics and not just ego stroking and vanity metrics.

Vanity or not, knowing that a few hundred people checked out a post I made when I linked it from an HN comment is valuable to me. It helps motivate me to write the next one, because I'm writing for others rather than myself.

Maybe others create in a void, but I'll play my piano poorly rather than write about software documentation if I'm doing something for pleasure.

The most important metric I want to track at the moment is the number of people who come to my website using the link on my resume. It helps me understand how many of my applications might have been met with interest (which so far has been 1, unfortunately).

With everything else, I agree. I write as a means of documenting my findings and sharing it with others and surely the discussion section here on HN is where it becomes useful to me where I can engage in constructive conversation and learn new things.

Thanks for reading the article, cheers.

I’ve been looking to add some analytics to the endoflife.date API (JS obviously doesn’t work) and my no-JS options are:

1. Netlify analytics, which I’ve tried in the past and found under-powered

2. CloudFlare analytics (yes, there’s a No-JS variant in the Pro plan)

3. get your raw access logs from your host, and throw them at GoAccess/…. BunnyCDN seemed like the simplest provider for this with access to raw logs in the standard tier. Both CloudFlare and Netlify restrict this to the Enterprise tier.

Maybe Pirsch is an option for your use case?

https://docs.pirsch.io/get-started/backend-integration

Static-site hosted on netlify, so no. We could trigger a netlify function on every request, but that wouldn't scale.
For a personal website with few readers (say one view per day), it's difficult to know if the analytics report actual viewers or bots. Therefore it's useless.

For a personal website with many readers (say more than 100 views per day), it's vanity in the best case, and bad influence in the worst case (one should not produce content just to make more views, that's the lesson we get from social media). Therefore it's useless, at best.

For commercial websites I don't know. If I had to guess, I would say it's not making the world a better place, but maybe it helps someone justifying their job (which I see as a reason, but not as an excuse).

If you have the know-how and time/resources to maintain a self-hosted deployment, and care for security and privacy requests, that sounds like a sound plan. PostHog/Matomo are good choice.

If you want it done for you, then:

Matomo Cloud

Piwik Pro

Wide Angle Analytics

...

plenty of choices

The reason why I am still working on uxwizz.com and maintaining the current pricing model (source-available, paid license, yearly updates), is that it allows me to focus on making self-hosting as easy as possible and work on creating tools to reduce the time it takes to set up and maintain the platform. Most other tools, which provide a cloud offering, have no incentive in making self-hosting easier, as that would lead to their business/cloud offering losing money.
Of all the things that I have, time and resources surely are scarce. Thanks for taking the time to read, cheers.
I was also looking for server-side analytics, created my own, and now it's a product! The idea is that tracking can be done from both, a JS snippet (for easy integration) and an API. Both rely on fingerprinting and almost provide the same set of features. The API just lacks screen resolution. The method is GDPR (and CCPA and whatnot) compliant [0].

Original article: https://marvinblum.de/blog/server-side-tracking-without-cook...

Product: https://pirsch.io

[0] Before this comes up again: Yes, we checked professionally with an external DPO and it was checked by some companies you've probably heard of externally.

Pirsch was also recommended by others and looks like a product I'll be considering for projects with the resources to use a non-free tool. For my website, however, I think it might not be worth the spend for me.

Thanks for reading the post, cheers.

I went the other way entirely: no analytics, 100% static site, no logging.

It's super fast and it takes away one more thing to monitor and keep up, it's not as if I'm running an e-commerce site.

This is the way. However, if you do want to view some stats about your site, you can get them by checking the domain on Google Search console [0].

[0]: https://search.google.com/search-console/about

I've done exactly the same. I must admit, there's a sense of FOMO — if I weren't hosting on GitHub Pages, I would 100% do some analysis of server logs to learn something about site traffic. However, on balance, this is still the best option!
I went this way even running a design service website, works great, lets me focus on what matters, serving my actual customers and that's the best metric of all, actual paid orders, that's all I need to know :)
I do this as well for most of my sites, and I stopped using analytics. I just want to write what I want to write...to hell with maximizing views.
Good idea - one "analytic" is to put your email on the site, and see how many people say hello!
I have visitor statistics enabled on my site and I like to see how many visits I get on articles. The point is to not see more in it than it can tell you, so I don't really understand the 'remove all statistics because it doesn't matter' argument.

However, I must say your idea is a very good one!

I see it like this:

- If the analytics don't change the way you write, then they are useless overhead. - If they change the way you write (because you try to maximize the number of views), then they may be toxic.

IMO you should write what you have to say, not what you believe people will want to read (with the help of tracking).

When I realized that, I removed GoatCounter from my website, which is now a minimal, static, no-javascript, no-tracking personal blog. And it feels good.

That's exactly my take.
I think the argument is "remove 3rd-party analytics because it is not worth the downsides".
Completely agree. No 3rd party code on my sites.