If you have a website you likely will want to know how many people visit it, how long they stay on each page, where they’re from and what they’re clicking on. Google has a built in analytics solution that can tell you these things but it doesn’t catch everything, if you’re using ad block or not using google then google can’t collect data on your visit. The most reliable way of collecting analytics data is to use an analytics solution such as Plausible. Plausible uses a chunk of code in your web page to contact their servers and relay information about your visit. I don’t like sharing my data or yours with outside companies, this is one of the main reasons I have self hosted every portion of my home lab and website, luckily, Plausible can be self hosted.
I will only give a very brief overview of how I set this up as this is not a tutorial. First I created a virtual machine on my server to run my reverse proxy. A reverse proxy intercepts all website requests entering your network and distributes them to the proper server, it allows you to host multiple sites or subdomains from a single address. It can also be used as a way to filter incoming requests and block malicious addresses from reaching my network. I next started another virtual machine and installed Plausible and used the reverse proxy to connect it to the internet using the subdomain plausible.wilsonfabrication.net . This was an incredibly brief overview that significantly downplayed how difficult it was to set up, I’m new to all of this so any time I try something new I have a large learning curve.
I thought it would be cool to show you behind the scenes at what data websites actually collect on your visit, so below is my actual analytics dashboard. It is a live integrated dashboard pulling data straight from my self hosted analytics server, you may notice it says 1 (or more) current visitors and that is actually you right now. Feel free to poke around and see what data websites can see about you.