Sub topic 2
How scanning is measured: fixations, saccades and heatmaps
This chapter assumes you know basic HTML and CSS and the common page parts: header, navigation, hero section and call to action. It does not assume any background in vision science or user research. By the end you should be able to read an eye-tracking heatmap critically and say what it can and cannot tell you.
Why measurement matters
The previous chapter argued that people scan pages instead of reading every word. That claim comes from measurement, not from opinion. Researchers record where people look, for how long, and in what order. The F-pattern and the Z-pattern, which later chapters cover, are summaries of that kind of data.
If you can't read the data, you can't judge how strong a claim about "how users look at pages" is. Many articles show a red-and-yellow image and treat it as proof. This chapter explains what the image is made of.
What an eye tracker records
An eye tracker is a device that estimates where a person is looking on a screen. Most modern trackers use a small infrared light and a camera. The light reflects off the cornea (the clear front of the eye). The camera captures the reflection and the position of the pupil. Software compares the two to calculate a point on the screen. Trackers do this many times per second, typically between 60 and 1000 times, which is called the sampling rate.
The raw output is a stream of timestamped coordinates, such as "at 0.512 seconds, x = 640, y = 210". Nobody studies that stream directly. Software groups the points into two kinds of events: fixations and saccades.
Fixations and saccades
Your eyes do not glide smoothly across a page. They move in quick jumps and stop between jumps.
- A fixation is a moment when the eyes hold still on one spot. This is when the brain takes in detail. Fixations during reading usually last about 200 to 300 milliseconds, though the length varies with the task and the difficulty of the content.
- A saccade is a fast jump between two fixations. Saccades last roughly 20 to 40 milliseconds. Vision is strongly suppressed during a saccade, so almost no useful information is taken in while the eye moves.
- A scanpath is the ordered sequence of fixations and saccades for one person on one page.
Fixations are the unit most design analysis uses. A fixation tells you that something was at least looked at. A long fixation, or several fixations close together, often suggests the content was hard to process or especially interesting. It does not tell you which of the two.
Foveal and peripheral vision
Only a small central area of the retina, the fovea, sees sharp detail. It covers roughly the width of your thumb at arm's length. Everything outside it is peripheral vision, which is blurry but good at detecting motion, large shapes and strong contrast.
This explains scanning behavior. A reader fixates on a spot, sees a few words sharply, and uses peripheral vision to decide where to jump next. Large headings, bold text and high-contrast buttons are visible in the periphery, so they can pull a saccade toward them before the reader has examined them closely.
Peripheral vision also creates a caution for interpretation. A person can notice a large banner without ever fixating on it. A heatmap built from fixations may then undercount things people did see.
Turning fixations into heatmaps
A heatmap is an image that shows where fixations gathered across a page. Software lays a color gradient over a screenshot. Warm colors (red, orange, yellow) mark areas with many or long fixations. Cool colors (green, blue) mark areas with fewer. Areas with no color got little or no attention.
A heatmap is built in four steps:
- Record fixations for each participant on the same page.
- Choose a measure, either fixation count or total fixation time at each location.
- Add the data from all participants into one set of values per screen position.
- Smooth the values into a gradient and map them to colors.
The result is an aggregate. One person's scanpath might look nothing like the final picture. The F-pattern appeared in this way: individual paths varied, but when many were combined, a rough F shape of heavy attention emerged.
Common eye-tracking visualizations
| Visualization | What it shows | Best used for |
|---|---|---|
| Heatmap | Combined fixation density across participants | Seeing which regions got most attention overall |
| Gaze plot (scanpath) | Numbered fixation circles joined by lines, for one person | Understanding the order in which one person looked |
| Areas of interest (AOI) metrics | Numbers for chosen regions, such as time to first fixation | Comparing specific elements, like two button designs |
| Clustering or opacity map | Everything dimmed except the areas that were looked at | Quickly showing what was ignored |
An area of interest, or AOI, is a region you draw around an element, such as the call to action. Common AOI metrics include time to first fixation (how long until anyone looked there), fixation count, total dwell time, and the percentage of participants who looked at it at all. For design decisions, AOI metrics are often more useful than a heatmap, because they give numbers you can compare between two versions of a page.
A small worked example
You can sketch how a heatmap is computed without an eye tracker. The Python code below takes a list of fixations, each with a position and a duration in milliseconds. It adds them into a coarse grid, so each cell holds total fixation time.
from collections import defaultdict
# Each fixation: (x, y, duration_ms) in screen pixels
fixations = [
(120, 40, 250), # logo
(700, 45, 220), # navigation
(130, 200, 300), # headline
(140, 260, 280), # headline, second line
(150, 330, 240), # first paragraph
(135, 420, 180), # second paragraph
(900, 600, 400), # call to action
]
CELL = 200 # grid cell size in pixels
grid = defaultdict(int)
for x, y, duration in fixations:
cell = (x // CELL, y // CELL)
grid[cell] += duration
for (col, row), total in sorted(grid.items(), key=lambda item: -item[1]):
print(f"cell column {col}, row {row}: {total} ms")Running this prints the cell at column 0, row 1 first. It holds the headline and the start of the paragraph, with 300 + 280 ms in the same cell (the y values 200 and 260 both fall in row 1). A real tool does the same grouping with thousands of fixations, then blurs the grid so neighboring cells blend into smooth color.
Notice the choice built into this code. It sums duration. If you counted fixations instead, a spot with many brief glances would rank higher than one long stare. The two measures can give different pictures, so a heatmap should always say which one it uses.
How the map is read: a diagram
The path from eye to design decision has several steps, and each one adds assumptions.
What heatmaps cannot tell you
A heatmap answers one question: where did eyes point? Several things it does not answer cause most misreadings.
- It does not show why. A hot spot on a form field could mean interest or confusion. The same spot could be red because users could not understand the label.
- It does not show success. Attention on a button does not mean anyone clicked it, and attention on a headline does not mean it was understood.
- It depends on the task. People told to find a phone number look differently from people told to browse. A heatmap without its task description is hard to use.
- It depends on the sample. A small group of participants, or one that does not match your real audience, can produce a pattern that does not generalize.
- It depends on the page. A heatmap describes one specific layout. A different page can produce a different pattern.
Calibration also matters. Before a session, the participant looks at known points so the tracker can map eye position to screen position. If calibration drifts, the heatmap may be shifted by a few dozen pixels. That is enough to assign attention to the wrong element on a dense page.
Related tools that are not eye tracking
Eye tracking needs special hardware and a lab or a controlled session, so many teams use cheaper stand-ins. These measure different things and should not be mixed up with gaze data.
- Click maps record where users click or tap. They show action, not attention.
- Scroll maps show how far down the page users go. They are useful for seeing where a long page loses people.
- Mouse-movement maps record cursor positions. Some research has found that cursor position and gaze are correlated in some cases, but the link is weak and uneven. Treat them as a rough proxy at best.
- Predictive attention maps use a model, often trained on past eye-tracking data, to estimate where people would look. They need no participants, but they are predictions, not observations.
Later in the tutorial, the chapter on validating layouts shows how to combine these sources. For now, the useful habit is to ask of any image: what was actually measured, and from whom?
Connecting measurement to scanning patterns
The measurements in this chapter explain what a scanning pattern is. The F-pattern is not a rule the eye follows. It is the shape that appears when fixation data from many people reading text-heavy pages is added up. The Z-pattern comes from a layout heuristic in print design, not from this kind of aggregated data, which is a difference the Z-pattern chapters return to.
Keep three points from here as you continue:
- Fixations carry information and saccades mostly do not.
- A heatmap is an aggregate, so the pattern may not describe any single person.
- Gaze data shows attention only. Interpreting it takes the task, the sample and the design context.
Exercise
A heatmap of your pricing page shows a bright red area over the "Enterprise" plan name and almost nothing over the "Start free trial" button. A teammate says users ignored the button. Give two reasons this conclusion may be wrong, and name one measure you would add to check it.
Show answer
First, the button may be large and high-contrast enough to be noticed through peripheral vision, so it had few fixations without being ignored. Second, the heat may reflect fixation duration, and the plan name may simply be hard to read or confusing, which produces long fixations without implying interest. Also, the heatmap shows attention, not clicks. To check, add an area-of-interest metric such as time to first fixation and percentage of participants who looked at the button, and compare it with click data for the same button.
Exercise
In the Python example, change the program so each cell counts the number of fixations instead of the total duration. Which cell ranks first with the sample data, and why might this ranking differ from the duration ranking?
Show answer
Replace grid[cell] += duration with grid[cell] += 1. Cell column 0, row 1 holds two fixations (the headline at y=200 and y=260), and no other cell holds more than one, so it still ranks first. With other data the rankings could differ, because many brief glances raise a count without raising total time, while one long stare raises total time without raising the count.