Tips lesson

How Computers Guess What a Visitor Will Do Next

Nathan Hollis Nathan Hollis · · 3 min read
How Computers Guess What a Visitor Will Do Next

You’ve seen it happen. You look at one product online, and later that same item follows you around the web. That’s not magic. A computer watched what you did and made a guess about what you’d do next. This kind of guessing has a name: machine learning. Here’s how it works in plain words.

What machine learning really does

Machine learning is a way for a computer to learn from past actions. You don’t give it strict rules. Instead, you show it lots of old examples. It finds patterns in them on its own.

For a website, the examples are visits. The computer looks at what past visitors clicked, how long they stayed, and what they did at the end. Some of them bought something. Most did not. The computer studies both groups and learns what a buyer tends to do.

Then a new person arrives. The computer compares them to everyone it has seen. It gives them a score, like a percent chance, that they’ll buy too.

Think of a teacher reading the class

Picture a teacher who has taught for many years. She’s seen thousands of students. She’s learned the small signs of a kid who is about to give up: they stop asking questions, they slump, they stare out the window.

So when a new student shows those same signs, she steps in early. She isn’t reading minds. She’s matching what she sees now to what she saw before. A computer does the same thing, just with numbers and a lot more examples.

A tiny example

Say your site learned this from old visits. People who viewed three pages and added an item to the cart bought about 60% of the time. People who viewed one page and left right away bought about 2% of the time.

Now two visitors show up. One adds an item to the cart. The other reads one page and stops. The computer gives the first a 60% score and the second a 2% score. Same site, very different guesses, based only on what each person did.

Why it’s a guess, not a promise

A score is never a sure thing. A 60% chance still means 4 out of 10 of those people walk away. The computer is playing the odds, not telling the future. It can be wrong about any single person.

That’s fine. You don’t need to be right every time. You just need to be right more often than a blind guess. Over many visitors, even a small edge adds up.

What you can do with it

The point of a score is to act on it. If someone has a high chance to buy, you might show them a free shipping note to nudge them. If someone has a low chance, you don’t waste a discount on them.

You don’t need to build any of this yourself to start. Just begin by watching one thing: which visitors end up buying, and what they did first. Look for one shared step they all take. That step is your earliest clue, and it’s the same clue a computer would learn too.

Nathan Hollis

Nathan Hollis

Analytics tutor · GA4 & GTM

Web analytics consultant with 15+ years of experience helping businesses turn raw data into actionable insights. Google Analytics certified professional and former analytics lead at digital agencies across the US. Regular contributor to analytics industry publications and conference speaker on privacy-first tracking strategies.

More about me →