29 days ago · Tech · 0 comments

This blog is a Hugo-generated static site hosted on AWS using S3 and CloudFront. I’ve been running GoatCounter on my site using the provided script to see who views my blog posts. Every time someone visits my site, a request goes out to GoatCounter. The problem is that adblockers like uBlock Origin block it (understandably). To get around this, I set up proxying so that the GoatCounter requests go to an endpoint under my domain nelson.cloud/gc/count, and then from there CloudFront handles it and sends it to GoatCounter. Most ad blockers work based on domain and GoatCounter is on the blocklists. Since the browser is now sending requests to the same domain as my site, it shouldn’t trigger any ad blockers. This post explains how I did it in case it’s useful for anyone else. It’s possible to self-host GoatCounter, but my approach was easier to do and less infrastructure to maintain. Perhaps in the future. On Analytics and Privacy I know I’m bypassing a user’s preference to not be tracked,…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.