We wanted three numbers for RadarMakers : how many pages were viewed, roughly how many people viewed them each day, and where they came from. We did not want a cookie banner, a third-party script, or a table full of IP addresses. This post explains the implementation, a Go backend with Postgres and a Next.js frontend, and its limits.
What gets stored
We do not store a separate event row for every page view. Every page view increments counters in a set of aggregate tables, each keyed by the UTC day: views and visitors per day, views per hour, per page, per referrer host, per country, per device class, per campaign, and per pair of internal pages for "came from this page to that page".…