Skip to content
Faisal Mahmud TusherDigital marketing, SEO & analytics
with Faisal Tusher

Glossary term

Data Sampling

When an analytics tool calculates a report from a subset of the data and scales the result up, rather than processing every event.
AnalyticsprocessUpdated

Definition

Data sampling, in analytics, is the practice of computing a report from a subset of the collected events and extrapolating to the full population. It is a performance shortcut: the tool trades precision for speed when a query would otherwise take too long or cost too much to run.

In GA4, the guide to reports and dimensions sets out where sampling can and cannot happen. Standard reports are not sampled. Explorations can be, when a query covers more events than the documented quota for the date range, and the exploration shows an icon when it happens, reporting on hover whether the result is based on all data or on a sample and what share was used. That is why a standard report and an exploration can disagree about the same metric for the same period.

In practice: the sampling indicator and when explorations sample

The tutorial on GA4 explorations makes reading the indicator the step before any result leaves the screen. Sampling becomes likely as three things grow: the date range, the complexity of the segments and the size of the breakdown. The remedies follow directly: narrow the date range, simplify the segments, or reduce the breakdown until the query fits under the quota. The paid tier of the product offers a more detailed results option. The tutorial also asks for a note on the exploration itself saying whether its figures were sampled, because anyone looking at a screenshot later will not see the icon.

Analyses that feed decisions treat sampling as part of their method. The funnel analysis tutorial chooses a period long enough to cover full weeks but short enough that the exploration is not heavily sampled, and records the sampling status beside the date range when the funnel is shared. The A/B test analysis tutorial checks the indicator before reading a test's exploration and names the BigQuery export as the source of exact, unsampled counts per arm. The site search analysis tutorial checks it on every tab of its search explorations before the results are exported for theming.

Sampling, thresholds and the (other) row compared

Sampling is one of three mechanisms that make GA4 figures differ from what was collected, and each has a different cause and fix:

  • Sampling estimates a result from part of the data. The numbers shown are approximate; the fix is a smaller query, a standard report or the export.
  • Data thresholds withhold rows that could identify individuals, typically small segments when Google signals or demographic data are involved. A withheld row is missing, not zero.
  • The (other) row gathers the long tail of a dimension once its distinct values pass a documented daily limit, a problem of Cardinality. The data is complete in total but cannot be broken down.

Each shows itself differently: an icon on the exploration for sampling, a warning icon for thresholds and a row labelled (other) for cardinality. Confusing them leads to the wrong fix, such as shortening the date range of a report whose real problem is a dimension with too many values.

Illustrative example — not a real result

A yarn shop reruns a year-long funnel

Ravelstock Yarn Supplies built a funnel exploration over twelve months to compare how phone and desktop visitors moved from product page to purchase. The sampling icon showed the result was based on 31% of the data, and the phone segment showed a checkout-to-purchase rate of 22%, far below the 58% on desktop. The analyst rebuilt the same funnel twelve times, one month at a time, each unsampled, and added up the step counts. The phone checkout-to-purchase rate came out at 49% against 57% on desktop. The gap was real but much smaller than the sampled view had suggested, and the planned rebuild of the phone checkout was replaced by a smaller fix to its address step.

GA4 samples only in explorations, which is why its standard reports are the safer source for headline figures. Cardinality causes the (other) row, a different loss of detail that is often mistaken for sampling. Sampling adds estimation error on top of the random variation that Statistical Significance already has to account for, which is why test analysis uses unsampled counts. And because a sampled figure for Session counts or rates in a small segment rests on few underlying events, it is the kind of number most likely to be wrong.

Common confusions

  • Sampling and product samples. In analytics the word means estimating from part of the data, not free samples of a product.
  • Every GA4 report can be sampled. Standard reports are not; explorations can be.
  • A sampled number is wrong. It is an estimate; it is usually close for large totals and unreliable for small segments.
  • Thresholds are sampling. Thresholds withhold rows for privacy; sampling estimates from part of the data.
  • A longer date range is always better. In an exploration, a longer range raises the chance of sampling; several shorter, unsampled ranges can be more reliable.

More terms to look up

Where this term is used

Sources

  1. [GA4] Get started with Explorations — Google Analytics Help

Related