All writing
Part 1 of 1I Was Here

Who's Reading This? What Web Analytics Actually Is

Every like and every impression is a counter going up. Websites have the same counters, and a lot more. Here's how a website knows you showed up, what it can count, and why counting is only the first step.

By 9 min read

We've all been there. You post something on Instagram, put the phone down, and pick it up two minutes later. The likes have started climbing.

On LinkedIn it's impressions. When I shared my last article, I was excited. I was curious who all had seen it. And honestly, watching the views go up felt good.

That's the rush. Somebody saw it. Somebody cared, a little.

Companies feel the same rush, with a lot more riding on it. When a team ships a new feature, the first questions are the ones you ask about a post. Did anyone see it? Did anyone use it? Did they come back the next day?

The answers come from web analytics. And it goes much further than counting likes. At its far end, it can follow one person from site to site and shape what they see next. Sometimes that's helpful. Sometimes it's a little dangerous. We'll get there.

First, let's look at how it actually works.

Interactive: Your post and your website count the same way

Two cards count the same example visits as they arrive. A social post shows views and reach; a website shows page views and unique visitors. Views rise with every visit, reach only with each new person. The numbers are made up.

I wanted to know who was reading

Here's how I fell into this.

I write posts on my portfolio and share them on LinkedIn. LinkedIn tells me how many people saw the post in their feed. But the moment someone clicks through to my site, LinkedIn's job is done. Did they read the article? Did they leave after one paragraph? Did anyone find my site some other way?

I was always curious. How many people visit my portfolio? How many actually read a post to the end?

And I had no idea how a website could even answer that. I'd heard of Google Analytics. I knew big companies had dashboards full of charts. But I couldn't have told you what happens between someone opening a page and a number going up on one of those charts.

So I dug in, and then I built a small version for my own site. This post is where I started: what web analytics is, how one visit gets counted, and how far the counting can go. It's the first part of a series, and each part goes one step deeper.

Web analytics is a clicker and a notebook

Here's the plain version. Web analytics is how a website keeps track of what people do on it, so the people running it can decide what to change.

Think of a small shop. The owner keeps a clicker at the door. Someone walks in, click. At the end of the day, they know how many people came in. That's the simplest kind of analytics.

Now hand the owner a notebook. They start writing down a little more. What time the shop got busy. Which shelf people stopped at. Whether they came in from the street or from the mall side. Now the owner can make decisions: move the popular items to the front, open earlier on Saturdays.

A website does the same thing, automatically and at a much bigger scale. And it's everywhere. Google Analytics alone runs on 47.7% of all websites, according to W3Techs in August 2026. Most sites you open today are counting you in some way.

A visit is a little note your browser sends home

So how does a website know you showed up? It turned out to be less magic than I expected. Four steps.

  1. You open the page. Your browser downloads the article, the images and the styles.
  2. A small script runs. Along with the article, the page includes a few lines of code whose only job is counting.
  3. The script sends a note. It's a tiny message to a server, something like "someone opened this article, on a phone, coming from LinkedIn." Developers call this a beacon: a small, one-way signal that says "I was here."
  4. A dashboard adds one. The server stores the note. Later, the site owner opens a dashboard and watches the count tick up.

Interactive: How one visit gets counted

Four steps: you open the page, a small script (about 2 KB) runs after the page loads, it sends a short note to a server (which page, what kind of device, where you came from), and the dashboard adds one to the count.

That's it. Every chart in every analytics tool starts life as a pile of these little notes.

A few things surprised me.

The script can be tiny. Popular analytics libraries are around 50 KB. The one counting visits on this site is about 2 KB, and it waits until the page has finished loading before it does anything.

You don't have to do anything to be counted. Opening the page is enough.

And the note can say a little or a lot. "Someone opened this page" is one end. The other end is a long list of details about you and your device. What goes into that note is a choice the website makes. That choice is what most of this series is about.

For developers: how the counter on this site worksshow

The script loads only on the live site, and only after the browser goes idle, so it never competes with the page itself.

It sends events with navigator.sendBeacon, which hands the request to the browser. That way it still goes out if you close the tab mid-read. If sendBeacon isn't available, it falls back to fetch with keepalive: true.

The beacon posts to /ingest on my own domain, a first-party route, instead of an analytics company's domain. That route forwards events to PostHog.

It sets no cookies. Part 2 is about how you count visitors without them.

Instagram and your website count the same two things

This is where the Instagram numbers come back, because they map almost exactly onto a website.

Say a friend watches your reel three times. Instagram counts that as three views: every time the reel was shown. But it's one person, so your reach only goes up by one. Reach is how many different accounts saw it.

Websites have the same pair:

  • A page view is one page being opened, once. Open it three times, that's three page views.
  • A unique visitor is one person, or more honestly one browser, no matter how many times they come back.

Back to the shop. The door clicker counts entries. That's page views. If the same customer runs out to their car and comes back in, click, click. Unique visitors is the owner trying to count actual people, and that's much harder. The clicker can't tell faces apart.

Keep that last line in your back pocket. How a website tells "the same person" from "a new person" is the most important question in this whole series. Part 2 is about doing it without knowing who anyone is. Part 3 is about what happens when sites do know.

Interactive: Views vs reach

Each tap sends one of three friends to your post. Every visit adds a view (a page view, on a website). Only a friend's first visit adds to reach (a unique visitor). Three friends visiting six times is six views and a reach of three.

There's one more lesson hiding in Instagram. In 2025, Instagram dropped its impressions number and replaced it with views. Same idea, new counting rules. A lot of people's charts suddenly stopped lining up with the year before.

Websites have the same problem. Two tools can both say "visitors" and mean different things. When Google replaced its old analytics product with GA4 in 2023, plenty of teams had to relearn what their own numbers meant.

So here's the first rule of reading any dashboard: find out how a number is defined before you get excited about it.

Counting is only the first step

So far, all we've done is count. But a website can learn a lot more than "someone showed up."

I think of it as a ladder. Each step up tells the site more, and asks more of you.

  1. Count. How many visits, which pages. No idea who anyone is.
  2. Where from. Did they come from Google, LinkedIn, an email? Which country, what kind of device?
  3. What they did. Which buttons they clicked, how far they scrolled, where they gave up.
  4. Who they are. Recognising the same person tomorrow, next week, on a different site.
  5. What they see. Changing the page, the feed or the ads for that one person.

The first three steps don't need to know anything personal about you. My site stays on those three.

The last two are where things change. They're how your feed seems to know you've been thinking about running shoes. They're what most cookie banners are really asking about. Sometimes that's useful. It's also where analytics stops being a counter and starts being a profile, and that's the part that can get dangerous. We'll take it apart in part 3.

What to remember from part 1

  • Web analytics is counting what people do on a site, so someone can decide what to change.
  • Every number starts as a small note your browser sends when a page opens.
  • Views count showings. Reach counts people. Page views and unique visitors are the same pair.
  • Check how a number is defined before you trust it.
  • Counting is the bottom of a ladder. The higher steps need to know who you are.

A counter knows you came. A profile knows who you are. The rest of this series lives in the gap between the two.

I never asked your name

Here's the part I didn't expect when I started.

I never asked you to sign in. This site doesn't set a single cookie. You haven't clicked anything on this page. And your browser has already told this page quite a lot.

Interactive: What your browser told this page

A box that lists what this page can read from your browser with no cookies and no sign-in: device type, browser and system, screen and window size, language, time zone, your clock, where you came from, dark mode, touch screen, processor cores and memory. It is worked out in your browser, and nothing in it is sent or saved.

None of that left your device. The box above worked it out right here, in your browser, and kept nothing. But any site you open can read the same things, and many do.

So how much can a site learn about you without ever knowing your name? And can it tell you're the same person when you come back tomorrow?

That's part 2.

Get new posts by email

One email when I publish. No spam, unsubscribe anytime.

I'll only use your email to send new posts. Privacy