Data sampling: when an analytics report is an estimate, not a count
Some analytics reports aren't counts. They're worked out from part of your data and scaled up, which is close enough for big totals and unreliable for small rows. Most tools say when it's happening, if you know where to look.
In this article
Most numbers in an analytics report are counts. Some aren't. When a report would take too long to work out from every visit, many tools read part of the data, calculate the answer for that part and scale it up. That's data sampling, and what you get is an estimate.
Often a good estimate. But an estimate behaves differently from a count, and that difference explains a lot of reports that refuse to line up. Here's how sampling works, the three places it can happen, how to spot it in the tools that do it, and the things that only look like it.
How sampling works
Say you ask for a quarter's traffic broken down by country and landing page. Instead of reading every session, the tool takes a random share of them, builds the report from that share and multiplies every figure by the same factor to estimate the whole.
For big rows this works well. Your homepage, your main traffic source and your top country turn up in the sample often enough that the scaled figure lands close to the truth.
Small rows are where it breaks. Take a landing page that got a few dozen visits from one country. In the sample, that combination might appear a handful of times or not at all. Scaled up, the report can show a figure well above the real one, well below it, or zero. None of them is the count.
Sampling is close enough for big totals and unreliable for small rows. Almost everything that goes wrong with it follows from that.
Three places sampling can happen
Sampling isn't one thing. Where it happens decides whether you can still get the full number back.
| Where it happens | What the tool does | Can you get the full count? |
|---|---|---|
| When you run a report | Stores everything, then calculates one report from part of it because the query is too big. | Usually, by asking a smaller question: a shorter date range, fewer dimensions. |
| After storing | Records every visit, but keeps older data at a lower resolution to save space. | Not for those older periods. The detail is gone. |
| At collection | The tracking code sends only a share of visits or events in the first place. | No. The rest never arrived. |
The last two are easy to miss, because a report built from that data may carry no warning at all. Collection-time sampling is often a setting you choose, for example in performance and session-recording tools. As of November 2026, Vercel Speed Insights has a sampleRate option that sends only that share of events (all of them by default), and the sample rate for Matomo's heatmaps and session recordings can be set anywhere from 0.1% to 100%.
When it tends to happen
Each tool has its own rules, and they can differ by plan. In tools that sample when you run a report, the usual triggers are the same:
- Long date ranges. More data per query means a better chance of going over a limit.
- Custom reports and explorations. Prebuilt reports are often served from tables that were summarised in advance. Custom ones are more likely to be worked out on the spot, from the raw data.
- Segments, filters and extra dimensions. Each one adds work to the query.
- High traffic. The limits are set in events or rows, so the bigger the site, the sooner it reaches them.
Two examples of how this looks in practice, as of November 2026:
- Google Analytics 4. Sampling can start when the events a report, exploration or API request needs go over the property's quota: 10 million events for event-level queries on a standard property, and up to 1 billion on Analytics 360. Google then uses part of the data and scales it up to what it calls “directionally accurate” results. Standard reports draw on tables Google summarises in advance, but Google notes that filtering a large dataset by country can lead to sampling in standard reports too.
- Cloudflare Web Analytics. According to its FAQ, every beacon that arrives is recorded, and the raw data is kept unsampled for seven days. After that it's reduced to around 10%. When you open the dashboard or query the API, Cloudflare picks a sampling level anywhere between 0.0001% and 100%, depending on your filters and how many rows match. Very low-traffic sites are sampled at higher percentages, to keep the totals reliable.
So a small site isn't automatically safe. It's unlikely to need 10 million events in one GA4 query, but in Cloudflare Web Analytics anything older than a week is already stored at around a tenth of its original volume. Check the documentation for the tool and plan you actually use, rather than assuming the limits only apply to someone bigger.
How to tell if a report is sampled
- Look for the indicator. Tools that sample usually say so. In GA4 it's the data quality icon, next to the title of a detail report and in the top right of an exploration. It shows the share of data the result is based on, and an unsampled report says it's based on 100% of available data. Cloudflare's analytics dashboards show an icon with the sampled percentage when a chart uses sampled data.
- Compare a prebuilt report with a custom one. Same metric, same dates. If they differ by more than rounding, one of them may be an estimate.
- Split the date range. Run each week on its own and add them up, then run the whole month. Do this with something that adds up, like pageviews or events. Users don't: someone who visited in two different weeks counts once in the month and twice in the sum.
- Watch the small rows. If small numbers only ever come in steps of the same size, or a row is there one day and gone the next with nothing else changing, that's what scaling looks like.
What sampling does to your reports
- The same period gives two answers. The overview says one thing and your custom report says another.
- Small segments swing. A campaign with a handful of visits can look as if it doubled or disappeared. Careful UTM tagging doesn't fix this: the tags are right, there just aren't enough tagged visits in the sample.
- Trends wobble. In a sampled report, a change from one day to the next can be about which visits landed in the sample rather than what visitors did.
- Old reports stop matching. If your tool keeps less detail for older data, a report you saved last week and the same report run today may not agree.
Things that look like sampling but aren't
When two numbers disagree, sampling is one suspect among several. There's a longer list in why no two analytics tools agree on your traffic. These are the ones most often mistaken for sampling:
Visits that were never recorded
Browsers that block the tracking script, and visitors who decline a consent banner, are simply missing. That's a gap rather than a sample, and a shorter date range or a simpler report won't fill it. The consent part is the one you can do something about, as running a site without a cookie banner explains.
Rows hidden for privacy
GA4 withholds some data when it could reveal something about an individual, for example in reports with demographics or when user counts are low. Google calls these data thresholds. You can't adjust them, though a longer date range can help. The numbers look incomplete, but nothing was scaled.
An (other) row
When a report has more distinct values than its table has room for, GA4 keeps the most common ones and groups the rest into a row called (other). Page paths on a large site are the classic case, and secondary dimensions, filters and comparisons make it more likely.
Unique counts that are estimates
GA4 estimates users and sessions with an algorithm called HyperLogLog++, in unsampled reports too. Google says the difference is usually under 1%, though it can be more when several such metrics are combined. It's why users in the GA4 interface and the same count worked out from its raw data can differ slightly.
Users that don't add up
A visitor who reads two pages counts once in the site total and once on each page, so the users per page add up to more than the total. That's how unique counts work, in every tool.
Different definitions
Sessions, visits, users and unique visitors are defined differently from tool to tool. Two tools that both count everything can still disagree.
How to get closer to the real count
- Shorten the date range. It's what Google's own help page suggests for GA4. Run the pieces separately and add up only the metrics that can be added.
- Use prebuilt reports for headline numbers, and keep explorations and custom reports for digging.
- Ask a simpler question. Drop the secondary dimension, the segment or the filter you don't really need.
- Count from the raw data. If your tool can export raw events, as GA4 can to BigQuery, you can do the counting yourself. Check the export's own limits first: as of November 2026, GA4's daily export is limited to 1 million events a day on a standard property.
- Treat small rows in sampled reports as a direction. Fine for “more or less than last month”, not for a decision that turns on the exact number.
- Pick a tool that doesn't sample if exact counts matter more to you than flexible reports. Look for the word sampling in its documentation, not on its homepage.
A quick checklist
- Does your tool sample when you run a report, after storing, at collection, or not at all?
- Is there a sample rate anywhere in your tracking code or settings?
- Does the report you're reading show a sampling indicator, and what percentage?
- Is the row you care about small enough for sampling to distort?
- If two numbers disagree, have you ruled out blocking, consent, thresholds, (other) rows and definitions before blaming sampling?
Sampling isn't a flaw. It's a trade between speed and precision that someone made for you. The useful habit is knowing, for each number you act on, whether it's a count or an estimate.
Lomen doesn't sample: every pageview its script reports is counted. Like any script-based tool, it can't count visits where the script never ran, and its unique visitors follow its own definition. By default a returning visitor counts once a day, from an anonymous key that changes daily, so the numbers won't line up exactly with a tool that counts by cookie. It also has no custom events or funnels. If you need those, a general-purpose tool like Google Analytics is the better fit.