If you keep one line: A page-view counter is an upper bound on human visits, not an estimate of them.
The 1-page checklist version of this post is at the bottom. <!-- cu:4883156 -->
A founder posted a funnel last week that looked catastrophically broken. Seven days, 206 sign-in starts, 0 completed signups. Numbers like that send you straight into the auth code.
The code was fine. Of 205 clicks on the Google sign-in button over four days, about 190 came from a single country, every session a brand new visitor, and many reporting browser and OS pairs that do not ship in the real world. Safari on Linux is a user-agent string someone typed. Once that traffic was excluded, seven-day visitors dropped from 358 to about 85, and sign-in starts dropped from 206 to 1. The one remaining start was the founder's own test.
Nothing in the funnel was broken. The denominator was. And the source of that story is worth reading in full: 206 Sign-in Starts, 0 Signups, published 2026-10-15.
I read it from the other side of the same mistake.
My version of the fake denominator was worse, because it was empty
I have 21 static pages deployed, 20 of them free interactive tools. At one point I had gone 19 days with zero revenue and a confident narrative about why: the product was wrong, the market was wrong, the positioning was wrong.
Then I grepped the entire site for any instrumentation. Referrer capture, utm_, localStorage, anything that records a visit.
Zero pages. Not "low traffic". Not "traffic that didn't convert". I had never measured whether a single human being had ever opened any of those pages.
An empty denominator does not mean zero. It means you do not know, and every conclusion you draw from it is a story you told yourself. That is more dangerous than a wrong number, because a wrong number can be corrected.
Why static sites end up with no denominator
Static hosting gives you no access log. That is the whole point of static hosting, and it is also why the question "did anyone open this page" has no cheap answer.
The options I priced out, all checked on 2026-10-20:
| Option | What it costs | What it gives you |
|---|---|---|
| Google Analytics | an account, a consent banner, a script | more than you need at zero traffic |
| Plausible | from $9/month | full analytics |
| Fathom | paid tier, same band | full analytics |
| Simple Analytics | same band | full analytics |
If your actual question is "has this page ever been opened by anyone other than me", paying a monthly fee and installing a third-party script is a strange way to answer it. Answer the cheap question first. Upgrade when the answer stops being zero.
The 12 lines
This uses a free public counter API with no account, no backend, no cookies, and open CORS. Pick a namespace for your site and one key per page.
<script data-pv="1">
(function(){try{
var NS="my-site",KEY="home";
var ss=window.sessionStorage, sk='pv_'+KEY;
if(!ss.getItem(sk)){ss.setItem(sk,'1');
fetch('https://abacus.jasoncameron.dev/hit/'+NS+'/'+KEY,
{mode:'cors',cache:'no-store'}).catch(function(){});
}
var r=new URLSearchParams(location.search).get('ref');
if(r){try{localStorage.setItem('pv_ref_last',r);}catch(e){}}
}catch(e){}})();
</script>
Paste it before </body>. Four things it does deliberately: it never blocks rendering, it swallows its own errors, it deduplicates within a session so a refresh does not inflate the number, and it stores ?ref= locally so you can tell which link produced the load.
Reading the number back is the part people get wrong. The API has two verbs:
-
GET /hit/<ns>/<key>increments and returns the new value. Pages call this. -
GET /get/<ns>/<key>reads without changing anything. You call this.
If you check your own numbers with /hit, you are the traffic. I have seen this exact mistake in three separate "my counter is growing" posts.
curl https://abacus.jasoncameron.dev/get/my-site/home
{"value":1}
A 404 means that key has never been hit: a definite zero. A timeout, 429, or 5xx means you could not measure it, and that is a different state. Writing "unmeasurable" as "0" is the most common data error I keep finding in my own work, because 0 is the answer that lets you move on.
What it cannot tell you
This is a load counter, not an audience measurement, and the distinction matters more than the code.
It counts page loads, so it is an upper bound on human visits, never a lower bound. Crawlers, AI fetchers, uptime probes, and link previews all count. A number above zero does not mean a person read anything.
It cannot tell you the source, the time on page, the device, or the country. It has no idea whether the visitor was real. The founder in the story above had a real analytics product and still got fooled by 190 fake sessions, so a 12-line counter is not going to catch sophisticated junk traffic. What it will catch is the much more common case: you assumed nobody came, and you never checked.
It also depends on a free third-party API. Free APIs disappear. If the number matters, snapshot it. I append a dated line to a local file once a day, because App Store Connect taught me this the hard way: one indie developer found that sales reports older than about 30 days return HTTP 400, which is why 37 straight days of zero sales were only visible while they were recent.
Two more numbers from the same pile
The same week I found a teardown of ten honest launch posts published between September 20 and October 11: 800 press reprints, 3 visitors. One founder sent a launch through a wire service, got reprinted on roughly 800 sites, and received 3 visitors. Another paid for Product Hunt, a Reddit megathread, DEV, and a handful of directories, and reported that every directory and submission channel produced less than one unpaid segment: a YouTuber demoing the product for 38 seconds.
And the paywall story, from the same post: 41 apps, 37 consecutive days with daily units at zero, 15 actually downloadable, and exactly 0 of them free. The developer's own diagnosis is better than anything I would write: the funnel was broken earlier than traffic, because not one app could be opened and used for free.
That is the same shape as my empty denominator. Two different missing pieces, both invisible until someone actually counted.
The whole thing, if you want to batch it
Twenty pages is twenty paste operations, so here is the loop I use. It is idempotent, it produces no backup files, and it refuses to touch a page that has no </body>.
// node instrument.mjs --dir ./public --ns my-site [--dry]
import fs from 'node:fs';
import path from 'node:path';
const [,, ...args] = process.argv;
const arg = (k, d) => { const i = args.indexOf(k); return i >= 0 ? args[i + 1] : d; };
const DIR = arg('--dir', '.'); const NS = arg('--ns', 'my-site'); const DRY = args.includes('--dry');
const MARK = '<script data-pv="1">';
const RE = /\n?<script data-pv="1">[\s\S]*?<\/script>\n?/;
const walk = d => fs.readdirSync(d, { withFileTypes: true }).flatMap(e => {
const p = path.join(d, e.name);
return e.isDirectory() ? walk(p) : (e.name === 'index.html' ? [p] : []);
});
for (const f of walk(DIR)) {
const rel = path.relative(DIR, f).replace(/\\/g, '/');
const key = rel === 'index.html' ? 'home' : rel.replace(/\/index\.html$/, '').replace(/[^a-zA-Z0-9_-]/g, '-');
let html = fs.readFileSync(f, 'utf8');
if (RE.test(html) || !/<\/body>/i.test(html)) continue;
const tag = `${MARK}\n(function(){try{var NS="${NS}",KEY="${key}",ss=window.sessionStorage;`
+ `if(!ss.getItem("pv_"+KEY)){ss.setItem("pv_"+KEY,"1");`
+ `fetch("https://abacus.jasoncameron.dev/hit/"+NS+"/"+KEY,{mode:"cors",cache:"no-store"}).catch(function(){});}`
+ `var r=new URLSearchParams(location.search).get("ref");if(r)localStorage.setItem("pv_ref_last",r);}catch(e){}})();\n</script>`;
html = html.replace(/<\/body>/i, tag + '\n</body>');
if (!DRY) fs.writeFileSync(f, html, 'utf8');
console.log((DRY ? 'would-add ' : 'add ') + rel + ' -> ' + key);
}
Run it with --dry first and read the key list out loud. Two pages sharing one key is the second most common way this kind of measurement goes wrong, right after using /hit to check your own numbers.
If you want the same thing with a read-back widget and the caveats printed on the page instead of buried in a blog post, the free audit kit I give away includes the page-level scripts that started all of this: Zero-Traffic Audit Kit.
The point is not the counter. The point is that for 19 days I had a confident opinion about why nobody was buying, and no evidence at all about whether anybody was looking. If your own numbers are a story rather than a measurement, start with the cheapest possible measurement and let it embarrass you.
The 1-page version of this post
- Count crawlers, AI fetchers, link previews and your own test loads. Subtract them before you read anything as "people".
- Read with
/getonly. Reading with/hitinflates the number you are trying to measure. - Probe a path that does not exist. It must return 404, or every 200 you collected may be a catch-all redirect.
- After deploying, the honest first read is "external = 0" until you have subtracted your own verification visits.
I keep one of these for every audit I publish. The markdown file for this post, plus the other six, goes out by email: leave an address and say which post. One file, no sequence, no newsletter.
Top comments (1)
The line that an empty denominator means "you don't know" rather than zero is the useful bit for me. One thing I'd question: sessionStorage dedupe counts every new tab as a new visit, and a bot that never keeps storage will count every hit. Did you add anything to separate the two, or is it just an upper bound like you say?