Systems & InfrastructureCustom Apps & SolutionsAutomations
Replaced PostHog with a tracking system the agency owns, and pages that finally show where people stop
PostHog gives you one project per account, and this agency runs sites for a whole list of clients. So I built the tracker instead. Every clinic page now reports the same four steps, from landing on the page to a confirmed appointment, with no cookie banner and nothing added to slow the page down.
The problem
The agency ran landing pages for a long list of clients and could not see what happened on any of them. A page either filled the calendar or it did not, and when it did not, nobody could say why. Were people leaving immediately, getting as far as the calendar and stopping, or picking a time and abandoning at the last moment? Those are three different problems with three different fixes. PostHog is the obvious tool for this and it does not fit a client portfolio: the free tier is one project per account, so keeping each clinic separate meant a separate account, login and bill for every one of them, and the paid tiers price on how much traffic you track, so the bill climbs every time the agency wins a client. Neither shape works for a business whose whole plan is to add clients.
What shipped
- PostHog replaced outright by a system the agency owns, with no per-client account and no per-client bill
- Every client page reports the same four steps, so the one losing people is visible instead of guessed at
- Adding a new clinic is two lines pasted into the page, once
- No cookies and nothing identifying a person, so no cookie banner is needed
- Nothing for the visitor to wait on, so pages stay exactly as fast as they were
This was a decision between renting and owning, and PostHog is genuinely good software: the reason it lost here is shape, not quality. Its free tier gives one project per account, and keeping each clinic's numbers separate was the entire requirement, so the free version was never going to work. Giving every clinic its own account solves that and creates a worse mess: a login, a bill and a dashboard each, which nobody keeps up with past the first few. Paying for the shared version fixes the mess and reintroduces the cost problem, because the price is tied to how much traffic you track, so the bill grows every single time the agency wins a client. That is exactly the wrong shape for a business whose whole plan is to add clients. Building it once removes the ceiling. The honest cost of that choice, which I would say to a client's face: it is now software the agency looks after, and PostHog would have arrived with a finished dashboard where this arrived with a database.
The parts worth knowing, in order of how much they matter. Data leaves the browser using a method built for exactly this, which hands the message off and lets the page carry on, so nothing the visitor does is ever waiting on tracking. The request is deliberately shaped so browsers skip their usual permission check first, which removes a second round trip on every event. Which clinic an event belongs to is decided on the server from the address it arrived at, never read from anything the browser sent, so a page cannot claim to be a clinic it is not. The server reads exactly one thing about the request, the site it came from, and never touches the visitor's IP address or browser fingerprint, so there is nothing sensitive to lose in the first place. The session identifier lives in tab memory and disappears when the tab closes, which is what keeps the whole thing clear of cookie consent rules. Anything unexpected, an unknown clinic, a page we do not recognise, an oversized or malformed message, gets the same polite acknowledgement a real event gets, so someone poking at the address learns nothing from it. Most of the care went into the nightly maths: visits are grouped into one journey per person, dated in the clinic's own timezone rather than the server's, and a confirmed appointment counts as having passed every step before it, because that confirmation comes from the appointment system rather than the page. The counts are built so a later step can never show more people than an earlier one, which makes an impossible-looking funnel impossible to print.
Want one built for you?
Get on a call with me and let's talk it through.