remove cabin in favor of bearlytics

This commit is contained in:
John Bowdre 2024-12-01 16:56:22 -06:00
parent c3dedda4ff
commit 635cc59315
Signed by: john
SSH key fingerprint: SHA256:cZYnOxaLdo+MhBNMX38ihO/p2Kek6fBykSFoJwHBhUo
5 changed files with 9 additions and 50 deletions

View file

@ -1,7 +1,7 @@
---
title: "/changelog"
date: "2024-05-26T21:19:08Z"
lastmod: "2024-10-20T03:51:49Z"
lastmod: "2024-12-01T22:56:07Z"
description: "Maybe I should keep a log of all my site-related tinkering?"
featured: false
toc: false
@ -10,6 +10,9 @@ categories: slashes
---
*Running list of config/layout changes to the site. The full changelog is of course [on GitHub](https://github.com/jbowdre/runtimeterror/commits/main/).*
**2024-12-01:**
- Switch from Cabin analytics to lightweight-and-self-hosted [Bearlytics](https://github.com/HermanMartinus/bearlytics)
**2024-10-19:**
- Shut down Gemini mirror, removed links pointing to it

View file

@ -1,7 +1,7 @@
---
title: "Kudos With Cabin"
date: 2024-06-24
lastmod: "2024-06-26T02:13:13Z"
lastmod: "2024-12-01T22:49:24Z"
description: "Using Cabin's event tracking to add a simple post upvote widget to my Hugo site."
featured: false
toc: true
@ -14,6 +14,10 @@ tags:
- selfhosting
---
{{% notice note "Closing my Cabin" %}}
I've switched to a different [self-hosted analytics provider](https://github.com/HermanMartinus/bearlytics). It's much more minimal and lightweight, but doesn't (yet?) support event tracking so I've removed the kudos button from the blog. This post will remain in case anyone else wants to do something similar with Cabin.
{{% /notice %}}
I'm not one to really worry about page view metrics, but I do like to see which of my posts attract the most attention - and where that attention might be coming from. That insight has allowed me to find new blogs and sites that have linked to mine, and has tipped me off that maybe I should update that four-year-old post that's suddenly getting renewed traffic from Reddit.
In my quest for such knowledge, last week I switched my various web properties back to using [Cabin](https://withcabin.com/) for "privacy-first, carbon conscious web analytics". I really like how lightweight and deliberately minimal Cabin is, and the portal does a great job of presenting the information that I care about. With this change, though, I gave up the cute little upvote widgets provided by the previous analytics platform.
@ -181,5 +185,3 @@ You might have noticed that I'm not doing anything to display the upvote count o
In any case, after clicking the 👍 button on a few pages I can see the `kudos` events recorded in my [Cabin portal](https://l.runtimeterror.dev/rterror-stats):
![A few hits against the 'kudos' event](kudos-in-cabin.png)
Go on, try it out:

View file

@ -41,13 +41,6 @@
{{- end }}
{{- if eq $reply true }}
<hr>
<div class="kudos-container">
<button class="kudos-button">
<span class="emoji">👍</span>
</button>
<span class="kudos-text">Enjoyed this?</span>
</div>
<script src="https://res.runtimeterror.dev/js/kudos.js" async></script>
<span class="post_email_reply"><a href="mailto:wheel.east.brief@clkdmail.com?Subject=Re: {{ .Title }}">📧 Reply by email</a></span>
{{- end }}
<footer class="content__footer"></footer>

View file

@ -52,8 +52,6 @@
<link rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
{{ if eq .Site.Params.analytics true }}
<!-- cabin analytics -->
<script async src="https://cabin.runtimeterror.dev/hello.js"></script>
<!-- bearlytics -->
<script data-site="ZHFGHYJ" src="https://bearlytics.runtimeterror.dev/script.js" async></script>
{{ end }}

View file

@ -490,43 +490,6 @@ p:has(+ ul) {
}
}
/* Cabin kudos styling */
.kudos-container {
display: flex;
align-items: center;
}
.kudos-button {
background: none;
border: none;
cursor: pointer;
font-size: 1.2rem;
padding: 0;
margin-right: 0.25rem;
}
.kudos-button:disabled {
cursor: default;
color: var(--fg);
}
.kudos-button .emoji {
display: inline-block;
transition: transform 0.3s ease;
}
.kudos-button.clicked .emoji {
transform: rotate(360deg);
}
.kudos-text {
transition: font-style 0.3s ease;
}
.kudos-text.thanks {
font-style: italic;
}
/* Header anchor links */
.hlink {
opacity: 0.4;