Jan-Lukas Else

Thoughts of an IT expert

Saying Bye To Google Analytics & Disqus

Published on in 👨‍💻 Dev
Updated on
Short link: https://b.jlel.se/s/21a
⚠️ This entry is already over one year old. It may no longer be up to date. Opinions may have changed. When I wrote this post, I was only 18 years old!
AI generated summary: The blog post discusses the author's decision to remove Google Analytics and Disqus from their website due to privacy concerns and replace them with a more privacy-friendly and lightweight comment system using Github Issues and utterances.

When you publish websites, write blog posts and make them available on the internet, it’s not uncommon, that you also want to get statistics about how many people read your stuff, how many people visit your website etc. And you also want to enable comments under your blog posts, giving people an opurtunity to ask questions or just leave a reply.

For the first case Google Analytics is the most widely used solution. You get stats for free with all possible insights. Google takes care of getting theses stats, you just need to paste a small snippet in your site.

For the second case Disqus is the top player in the market. With the basic plan it’s also free and you can add comments to any site, even if it doesn’t natively support comments, like WordPress.

But nothing is free. Sometimes the costs are just hidden. In this case it’s the privacy you are trading.

Just search for Disqus on Google and read some opinions about it and why people removed Disqus from their websites. Not only is it pretty slow, because it loads a lot of other scripts and assets from many different domains, but also are these scripts all just for tracking and ads. It’s horrible in my opinion.

I just want to offer an easy way for everyone to comment under my posts, but don’t want to harm my visitors with stealing their privacy. That’s why I did the decision to not only replace Disqus with something more privacy-friendly and more lightweight (according to some sources on the internet Disqus is always loading like 700kb of dependencies) but also remove Google Analytics in the same step.

Because everywhere are ads and tracking on the internet most people use ad blockers these days. There are even a couple of browsers (like Brave) that block ads and trackers by default. Because of these trackers, the stats you get with Google Analytics are also pretty inaccurate too, so removing Google Analytics and stats from my websites isn’t a big loss either.


I replaced the comment system with a more tricky solution: Now I use Github Issues to host the comments. How did I get this to work?

With the help of utterances.

utterances is a Github project that offers to simplify the use of Github issues for blog comments. All you need is to past a simple script tag in your page template and it will automagically show the comment form.

Every comment thread is saved as a Github issue in the repository you need to initialize. So you also have more flexibility to swap the implementation in case you aren’t happy with the open-source utterances anymore.

Other advantages: (according to the project description)

  • No tracking, no ads, always free.
  • No lock-in. All data stored in GitHub issues.
  • Styled with Primer, the css toolkit that powers GitHub.
  • 9 KB gzipped. Vanilla TypeScript. No font downloads, no JavaScript libraries for evergreen browsers (bluebird, fetch and classList for IE 11 users)

Especially on the development blog I also hope this will result in a bit more comments. Because Disqus needed commenters to create an account, some didn’t comment. The new way just requires a Github account and that isn’t hard to set up.

What do you think about Disqus and this new replacement? Do you use Google Analytics? Feel free to comment 😉

Update:

I removed utterances from my pages again. First because I’m not 100% sure, wether it’s GDPR compliant and 2. because I think I don’t really need comments either.

Tags: , , , ,

Jan-Lukas Else
Interactions & Comments