One problem with website analytics tools is, it usually being blocked by Ad Blockers and Content Blockers. Mostly because it was hosted on a 3rd party server, some content blocker explicitly blocked Plausible by its script's name.
One way to work around the situation is, to proxy your analytics script through your own domain.
The most easy way is to proxy your script with Nginx. Please note that, you might run into SSL handshaking issue if your domain and your analytics domain not configured using the same SSL ceritificate, adding
proxy_ssl_server_name on; might bypass it.
If your domain already behind Cloudflare, you can use Cloudflare Workers to proxy your script. Note: if you host your blog on GitHub page with a custom domain, you probably have a CNAME record pointed to GitHub's server, if this is the case, follow the [Step 4] (https://plausible.io/docs/proxy/guides/cloudflare#step-4-optional-run-proxy-as-a-subdirectory) to config the custom route that point to your worker.
If you're using Next.js or deploying your application on Vercel, you can't use the above solutions, in this case, you can use
next-plausible package, it also supported proxying via a redirect in
For Gatsby, there is gatsby-plugin-plausible package that you can integrate easily.
Every posts that can be found on this site, sorted by last modified date: Computer and Programming Proxying Plausible Inbox Verify email…
Computer and Programming
Notes about technical stuff that I'm interested in: Write ups Implementation notes from my previous projects, some might helpful, but most…
If you think this note resonated, be it positive or negative, please feel free to send me an email and we can talk.