How I Use Analytics With My Indie Projects

We'll start with how and move on to why. I think why is more interesting than how.

(last update: 2024-09-26)

Scope

Most of the 50 or so little projects I built don't rely on analytics. I have a self-hosted umami.is instance running on Vercel with a Postgres db running on Railway. It handles 25 sites, with projects such as:

My railway usage is low enough not to exceed the monthly free usage tier ($5, I wouldn't mind paying.) Setting up a self-hosted umami instance is pretty simple. Learn more here.

Ensō (the web app) only fires a single hello event so I can get a rough number of page impressions for a given day.

 export const trackVisits = () =>
    fetch('/api/hello', { credentials: 'omit'}).catch()
	// api/hello.ts
    const db = await getDB()
    db.collection('visits').insertOne({
        at: new Date(),
        host: req.headers.host ?? 'unknown',
        ua: req.headers['user-agent'] ?? 'unknown',
    }).catch(error => console.error(error))

    res.status(200).send('oh hi mark')

The code tries to strip any unnecessary information and, looking at this now, I can see that I can make it even dumber.

I believe we should keep more of this stuff public because:

Long time ago, I used to have run a public DIY analytics service so my users could see exactly what and how I collected, but it was too much hassle to maintain and people didn't seem to care that much. I even called it palantir to keep things angsty and edgy. But nothing, nada.

Why and what to collect

I use analytics to solve user problems. Every metric should reflect that. Anything more than that is a burden: to the user, to my problem solving ability (focus) and to my own mental health. So, I try to collect as little as possible.

Metrics I care about

I'm trying to be strict with collecting only the metrics that can answer relevant questions. I also don't collect any "open" user input data in my tracking events (e.g. Meat GPT chat "queries"). The Tip of the Tongue is an exception here as I allow users to opt-in to sharing their queries.

Custom events

I collect custom events (CTA:hero:click, sit:session:interrupted). This is to:

Admin UX

I'm happy for things to be a bit clunky if I can just get stuff done and answer the right questions. A bit of friction is good for me as it makes it harder to obsess about unnecessary details, yak-shave or check the stats too often.

Wishlist

It would be useful to have an overview of all tracked sites, esp. to quickly spot any unexpected spikes, perhaps track a blog that mentions my work.

For now, I'm happy with it as it is. It's good enough, because it has just the right amount of friction to let me focus on work.

In future, instead of moving to a different approach I'll design something that would work for my specific needs and tests it with a bunch of people to see if I can make it sustainable.

Alternatives

Want to receive my work as I publish it? Subscribe here.

a giant foot-shaped snail with a house on its back. the house is still in construction, with a big crane towering above it The image is a stylized black-and-white illustration. In the lower left corner, there is a small, cozy-looking house with smoke rising from its chimney. The smoke, however, does not dissipate into the air but instead forms a dark, looming cloud. Within the cloud, the silhouette of a large, menacing face is visible, with its eyes and nose peeking through the darkness. The creature, perhaps a cat, appears to be watching over the house ominously, creating a sense of foreboding or unease.