Custom and calculated metrics in reports
GA4 lets you define custom metrics (registered from numeric event parameters) and calculated metrics (formulas combining existing metrics, like revenue per user). They extend reporting beyond the built-ins, but calculated metrics inherit the scope and null-handling of their inputs, which is where formulas go wrong.
What this means
Custom metrics are registered from numeric event parameters you send (for example, a 'score' or 'items_loaded' value), making them available in reports. Calculated metrics are formulas built from existing metrics and constants — revenue divided by active users, for instance — defined once and reused.
Scope and division pitfalls
A calculated metric inherits the scope of its operands; combining an event-scoped count with a user-scoped count produces a ratio that doesn't mean what you expect. Division is the classic trap: when the denominator metric is zero or null for a row, the result is undefined or misleading. Define the formula against operands of compatible scope, and decide how zero/null denominators should read before publishing the metric.
- Custom metrics: registered numeric event parameters
- Calculated metrics: formulas over existing metrics
- Mismatched operand scope breaks the result
How it appears in analytics and logs
A custom metric shows a registered event-parameter value; a calculated metric shows a formula result. A wrong figure usually means a scope mismatch between operands or division by a metric that is zero or null.
Diagnostic use case
Report on a business-specific number — revenue per active user, a custom value from an event parameter — by registering a custom metric or composing a calculated metric.
What WebmasterID can help detect
WebmasterID lets you derive first-party metrics from your own events without third-party data, keeping custom calculations on owned signals.
Common mistakes
- Combining metrics of incompatible scope in one formula.
- Ignoring zero/null denominators in a ratio.
- Registering a custom metric from a non-numeric parameter.
Privacy and accuracy notes
Custom and calculated metrics aggregate numeric values; they must not carry personal data in parameters. Thresholding still applies to the rows they appear on.
Related pages
- Looker Studio calculated fields
Calculated fields let you derive new fields with formulas — arithmetic, CASE logic, text and date functions — at the data-source or chart level. The decisive subtlety is aggregation: a formula's result depends on whether it is computed per-row then aggregated, or on already-aggregated values, which differs between field-level and chart-level calculations.
- Custom reports and collections
Through the Library, editors can create custom detail and overview reports, then bundle them into collections that appear in the left navigation. Changes are staged until published, and only users with the right role can edit — so reporting structure is governed, not ad-hoc.
- Sessions: what a session is and when it resets
A session is a group of interactions from one visitor within a bounded time window. It starts on the first event and ends after a period of inactivity (commonly 30 minutes, configurable). The reset rules differ by tool — and historically Universal Analytics also restarted sessions at midnight and on a new campaign — so the same traffic produces different session counts in different products.
- Event tracking docs
Send numeric parameters for custom metrics.
Sources and verification notes
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.