There’s a cliché: “What gets measured, gets managed.” I’d argue that “what gets measured, gets measured” is more accurate, and it’s what I’m after here.
Setting the right goals
As I’ve written before, this site is built using the Grav CMS. Grav’s nifty admin plugin includes a simple dashboard that includes basic page view statistics; I thought I might be interested in having:
- longer-term metrics than what the CMS offers, and
- a little bit more granularity, specifically:
- which pages are getting viewed (and ideally, read),
- to have some sense of where that traffic comes from,
- what screen sizes/browsers are being used, etc.
Over time, knowing that will guide (to some extent) what I write, and (to a greater extent) what sorts of technical changes I might implement.
There are plenty of solutions available to get this sort of information: Google Analytics is the most famous and widely used of these, and it’s “free”. That is, there’s no credit card required or no signup fee to get started, and no monthly billing… at least up to ten million visits/month. (I might get 10 monthly visitors for the foreseeable future, so no worries there.)
Honestly, Google Analytics is very good at what it does. If you’re strongly invested in Google’s Marketing Platform, it makes good sense to serve Google Analytics and enjoy the tight integration. There’s a reason it’s the largest player by far in the web analytics sector, and the price tag isn’t the only reason. A product that isn’t any good—whatever the price point—doesn’t get that kind of market share.
Outside of my day job, I’m not heavily invested in Google’s offerings. (Fun
fact: The City of Edmonton was the first major municipal government in Canada to
Google Apps G Suite Google
Rather, it’s the size (in two respects) of Google Analytics that was my primary
reason for seeking out an alternative:
- Its feature set is way larger than I need or care about.
- (Therefore) the size of its tracking script is way larger than I need, and it is much larger than I’d like to ship.
Regarding 1): I don’t have sales funnels. I have no desire to bring additional datasets into my website analytics tool. The demographics of my readership is not something I’m especially interested in, at least not to end of making a profit. I don’t have a strong monetary interest in my readers. I’ve been through Google’s own training on Google Analytics (I’m certified, in fact); it’s a complicated tool with hundreds (literally hundreds) of reports and metrics. I’d rather tinker with other things. I’m not keen to monetize this site in any major wayI have some availability from October 2021. If you’d like to hire me or pick my brain, ping me., but I would like to keep an eye on what content here gets the largest share of my paltry traffic.
downloading and CPU execution time. (See Addy Osmani’s
2019 essay/conference talk,
Tim Kadlec’s 2020 post
for details.) Google’s
analytics.js script weighs in at 49.4kB; its Tag
Manager script (part of Google’s recommended setup)
gtag.js is another 87.3kB.
analytics.js script would more roughly double the size of this page.
If you still want to use Google Analytics
Update September 2023: If you do decide to go with Google Analytics anyway and you’re feeling a bit overwhelmed, a reader shared this resource from Website Planet with me by email (thanks, Emma!) as a recommended resource while setting up their recipe blog. Google Analytics 4 (GA4) replaces Universal Analytics (UA), which was sunset on July 1 of this year.
Final Google Analytics remark: note, too, that they’re Analytics Toolkit is no longer supporting Google Analytics integrations, and that Google has established a reputation for sunsetting products, including their own A/B Testing tool, Google Optimize, which will stop working at the end of this month.
Of the “plenty” of solutions mentioned above, a subset of “privacy-focused analytics” tools and services have been growing in popularity in the last few years. They tend to be cookieless, and are considerably smaller in both script size and feature set. A search (yes, even in Google) will bring up a number of alternatives. To save you some searching:
- One good annotated list is available at privacyfocusedanalytics.info.
- Another is at this awesome-analytics github repository.
- Carl Cassar has a nice review post of a few options on his site.
Plausible is open source, which is a plus in my books. I don’t mind paying a couple of bucks a month to support the service and enjoy the relatively hassle-free experience of dropping a script tag on the site, although it’s nice to have the option to self-host.
Contributing to open source
As for the process of inserting the script tag on a site, I went ahead and wrote a plugin to handle configuring the Grav-Plausible integration from within the Grav admin panel. Check that out on GitHub if you like.
That project represents my first couple of GitHub stars. Only three, at the time of writing, but it surely feels nice to build something useful and helpful to others. There couple of enhancements yet to go, although it’s perfectly functional as it is. Putting it together was a great learning experience, and has given me an idea for another plugin and a bit of a short-term content strategy…
Stay well; stay tuned.