Web Analytics
Definition
Web analytics turns requests into visits, views, referrers and countries. There are two mechanisms, and the difference between them is not a detail. Client-side analytics loads a small JavaScript file on each page; it runs once the page renders and can report things only the browser knows, such as viewport size, scroll depth and which button was pressed. Server-side or edge analytics counts the request itself as the web server or edge node delivers it, before anything executes in the browser, so it sees every request for every file — HTML, images, PDFs, zip archives — but knows nothing about what happened after delivery. Google Analytics is the familiar client-side tool; log-based and edge products are the other kind. The same site measured both ways routinely differs by 10 to 40 percent.
Why It Matters
The gap matters most when what you published is a file rather than a page. A script can only run inside an HTML document, so a PDF behind a download link, a photograph or a zip fetched directly is invisible to it — a report pulled down 2,000 times from a page with 300 views is recorded by a browser script as 300 of something and nothing of the thing that mattered. Counting at the edge records all 2,300 requests, because every one of them passed through the same point. Client-side totals are also thinned by ad blockers and tracking protection, which suppress the common analytics scripts for somewhere between 10 and 30 percent of visitors, and considerably more for a technical readership. Knowing which method produced a number tells you what that number is missing.
How It Works
In the client-side model the browser parses the page, fetches the analytics script, and the script sends a small request carrying the address, the referrer and an identifier usually kept in a cookie or in local storage — that identifier is what lets it call two visits the same person. In the other model the node of the edge network that serves the file writes the request down as it goes: path, status, referrer header, the country resolved from the IP address, the user agent. No cookie is involved, so there is nothing to consent to under the ePrivacy rules and nothing follows anyone between sites; the trade is that telling two visitors apart becomes an estimate, usually from a hash that rotates daily. 99helpers counts at the edge without cookies, which is why a download of a hosted file registers exactly as a view of a hosted page does. Both models filter bots, which is a further reason two tools rarely agree on a total.
Real-World Example
A trade association publishes its annual salary survey as a 9 MB PDF on 99helpers at guildhall-survey.99helpers.site and links to it from a newsletter. The dashboard shows 1,840 downloads in the first week, 61 percent of them from the UK, with most referrals coming from the mail provider's link tracker. Had the same PDF sat beside a site measured only by a browser script, that week would have shown nothing at all, since no HTML page was ever loaded. The association used the country breakdown to justify commissioning a separate Irish edition the following year.
Common Mistakes
- ✕Comparing a client-side total with a server-side one and deciding one is broken — they count different events and will never agree
- ✕Expecting a browser script to record PDF or image downloads — no page loads, so no script runs and the file is simply absent from the report
- ✕Reading raw request counts as people — bots, prefetchers and link scanners all make requests, and one real visitor makes dozens
- ✕Adding a cookie-based tracker to a site that never needed one, then owing a consent banner that costs more visitors than the data is worth
Related Terms
Web Server
The software that listens for HTTP requests and answers them with files or generated responses. Nginx, Apache and Caddy are web servers; something like them sits behind every address you have ever opened.
Landing Page
A page built for one purpose, which people reach directly from an ad, an email or a shared link. It is judged by the share of visitors who do the one thing it asks.
Download Link
A download link is an address that makes the browser save a file to disk instead of displaying it in a tab. The behaviour comes from a header on the response or an attribute on the anchor tag, not from anything inside the file.
Edge Network
The fleet of servers a delivery provider runs in cities around the world, positioned close to visitors rather than close to your origin. It is the machinery a CDN is built from.
PDF Hosting
Publishing a .pdf at a web address so it opens in the reader's browser rather than landing in their downloads folder. The header the host sends decides which of those happens.
Put a file online in seconds
Drop in a document, an image, a page or a whole static website and share the link — free, with no build step and no server to set up.
Host a file free →