---
title: "A fire-and-forget page-view beacon"
url: "https://kaperkins.com/lab/page-view-analytics-beacon"
author: "Karl Perkins (K.A. Perkins)"
site: "Avodah Dynamics"
category: "Analytics"
published: "2026-06-19"
updated: "2026-06-28"
description: "/api/public/track plus a tiny PageViewTracker mounted at the root — no third-party analytics, full ownership of the data."
---

# A fire-and-forget page-view beacon

## Summary

/api/public/track plus a tiny PageViewTracker mounted at the root — no third-party analytics, full ownership of the data.

## Problem

I wanted real numbers without handing the data to a third party, and without bloating the bundle.

## Solution

Shipped a single POST route that writes to page_views with RLS, plus a 1KB client tracker that beacons on route changes. Aggregations live in the /admin/dashboard view.

## Lessons Learned

Owning the analytics table means I can join page_views to taxonomy dimensions later — the kind of question Plausible can't answer.

## Next Steps

Add weekly rollups and an "underloved content" report (high-quality posts with low traffic).

---
Source: https://kaperkins.com/lab/page-view-analytics-beacon · Karl Perkins, Avodah Dynamics
