ItsMillerTime

Archives concerning all matters web development and beyond

From my Desk

Wanting site analytics without Google

Published: 09/12/2022 | Time To Read:6mins

Today I want to discuss something important to most websites, analytics, and why I chose not to go with offerings from Google.

Why I site want analytics

Like most websites, having analytics helps a business or person see how they are doing with their web presence and what people are actually looking at, and for how long. I started out with Google Analytics but very quickly became overwhelmed by the features and such, as a hobbyist I just wanted the quick and dirty, so I ended up removing it.

For my personal use, things like conversions, events, and such weren't necessary. Still, seeing the URLs people were going to, how long they spent there, and while not beneficial seeing a country visiting from was lovely, if for nothing else because of curiosity.

So I use Google Analytics, right?

Well I did, like I said I started out with their offerings and even tried out Google tag manager (BTW does anybody care to explain to me what the difference between analytics and tag manager is because to me they look the same) to track this data, unhappily. Most people however use adblockers, and that's one of the most commonly blocked things. I don't blame people, Google has their hands in a lot of things and while they claim they care about privacy do they really?

My analytics were never very accurate because of this, how do I know that my data is really consistent with what is actually happening out there on the vast frontiers of my site! Furthermore, we all know how heavy the scripts are for it, sure they've done work to help and we have nice methods to defer things like GA till later after the user can interact, but I wasn't happy with that.

Enter Plausible Analytics

As I have been rewriting things on the backend of my website I kept telling myself that maybe I should just roll my own simple analytics platform, tracking page views and nothing more really, as that was my main priority, and began thinking about how I'd implement this, as I'd want to be able to use it on any website of my own, not just this one.

While on Discord chatting with other web developers one day someone mentioned this analytics product called Plausible). I went to their site and started looking around and was disappointed because I was hoping to avoid paying for such a tool, as my sites are just for a hobby, nothing of value. Then they pointed out that alas, they provide self-hosting options, which you can do for free! I said sign me up let's go!

Installing Plausible

The instructions for setting up a self-hosted version were very easy and concise and I was able to get up and running in literally a matter of minutes. Of course, using Docker for so many other things, I had already done I'd say 75% of the work needed to get running, mostly I just needed to clone a git repo, edit a couple of configuration files, and docker-compose took care of the rest.

Once the server was running and set up under a reverse proxy with Nginx I was able to load up the dashboard, with the credentials I provided in the configuration files from the last step and was greeted by a nice well done UI asking me to set up a site.

Setup Screen

So, of course, I keyed in itsmillertime.dev, picked my timezone and told it 'Add Snippet' which then gives you a script tag to put into the head of the site you are adding. Very simple and has all the information you need, and then clicked again, and was presented with the dashboard.

So what does Plausible give you?

That's a great question! And to that, I say here let's take a look at my site analytics together! One of the biggest things I am loving about Plausible is the transparency, as in they are open source, and as the admin, you can even have it expose your analytics for users to view as well. So come check them out.

I wanted to be able to track page views of the course, which it does, as well as how long people are spending there, and how many visitors were there. It also can tell you how many unique visitors have been to your site, page views total, and duration over time, and it does so without the use of cookies, things like user agents and IP addresses are all it takes, of course, none of this info is kept or relevant to it at the end of the day, making it GDPR compliant as well, you can read more about that here.

Where was I at again? Oh yeah, so while I've got nothing yet it can also tell you how people are finding your site, where they are visiting from (and you can use the MaxMind DB for that info versus their default from DB-IP), as well as the type of device, browser, and OS, all useful extras to me. Everything one could want in a lightweight package is included. Now I haven't dug into it but it also offers setting goals, and additional APIs for things like events to track conversions, etc if you want, and all through a simple REST API, I'll have to come back to that some other time though.

Some additional features also include the ability to get weekly/monthly reports, notifications of traffic spikes (maybe this post will explode and I'll get one), integration with Google Search Console, and being able to add others to see the nitty gritty inside the app, more features for me to try out later possibly.

I almost forgot a pretty big feature… the fact that the JS file you need to include is only 1.5KB in size, versus ~45KB for Google Analytics, that's huge savings! I'll keep those milliseconds tyvm Google!

So what do I think of Plausible? It's staying! I really hope to start seeing some data to see what people are looking at, as well as how many, i know its not much but it'd make me feel better than I'm not wasting my time, and i know Plausibles got my back.

Contact Me

Reach out today with any questions or concerns.

Follow Me

Be sure to see the latest and greatest

GithubLinkedInInstagramTwitterYouTube

Use of this site constitues acceptance of our Privacy Policy. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Its Miller Time Dev.

Copyright © 2022v2.4.2