How to know who is on your site, without a heavyweight analytics stack
Aggregate analytics tells you how many people visited last week. Knowing who is on your site right now, and what brought them, is a different and more useful thing.
Two different questions
Most analytics answers "how much traffic did we get". The operationally useful questions are narrower: is anyone on the site now, did that campaign produce a real person, and did the visitor who bought come from somewhere we can repeat.
Those need per visit records, not just counts.
The minimum viable version
A small script on each page that records a row when someone arrives. Keep it deliberately boring:
- Timestamp and page path
- Referrer, if any
- Any campaign parameters on the URL
- A coarse bot signal
- Which site, if you run more than one
Write it to a table you can query. That is enough to answer most questions that matter, and it is yours.
Alerting on arrivals
For a low traffic site, a notification when someone lands is genuinely useful. You see interest as it happens rather than in a weekly summary, and you learn quickly which pages people actually enter on.
Two cautions. Alert on real visits only, or bots will bury you. And be ready to turn it off: at a few hundred visits a day the notifications stop being information and become noise.
Separating humans from bots
Expect a large share of raw hits to be automated. Without filtering, every metric is wrong in the same direction. A simple user agent check removes the honest ones. Behavioural filtering catches more.
Also exclude yourself. Your own visits are a surprisingly large fraction of traffic on a small site, and they distort exactly the pages you care about most.
The mistake to avoid
If you run several sites through one table, record which site each visit belongs to and group by it in every query. Without that field you will happily produce journeys that never happened, stitched from two different businesses. It is an easy thing to add on day one and a painful thing to backfill.
Where it pays off
The value is not the dashboard. It is being able to ask a specific question later: what did the people who bought have in common, which entry pages produce nothing, did that referrer ever send a real human. Aggregate tools cannot answer those, because they threw the detail away.
Need help with any of this?
These notes are free and always will be. If you would rather someone just set it up, or you are stuck on something similar, get in touch at hello@opsira.io.