UJG / First Editors’ Draft /
GitHub
Table of Contents
  • 1Overview
  • 2Terminology
  • 3Metric Model
  • 4Mapping-derived Metrics
  • 5Core Metric Keys
  • 6Units and Value Conventions
  • 7Aggregation
  • 8Extension Metric Keys
  • 9Validation
  • 10Examples
    • 10.1Unexplained movement rate for one mapping
    • 10.2Traversal count for a transition
W3C Community Group Draft Report

Metrics

draft

Status of this Document

This report was published by the User Journal Graph Community Group . It is not a W3C Standard nor is it on the W3C Standards Track. Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. Learn more about W3C Community and Business Groups .

Status
CG-DRAFT
Version
2026.06
Published
2026-06-10
Last Update
2026-06-10
Editors
  • Seva Dolgopolov
Group
User Journal Graph Community Group
Repository
View Source
License
W3C-Software-and-Document

1. Overview

This module defines a minimal shared vocabulary for metric observations that can be exchanged between UJG producers, stores, and consumers. The first standardized slice is Mapping-derived metrics: counts and rates computed from Runtime event chains after they have been resolved against Graph intent by Mapping.

Metrics intentionally describe observed facts, not product-specific interpretations. For example, an unexplained movement records that Mapping could not identify a relevant effective transition for the movement. It does not imply that the movement was erroneous, invalid, or undesirable.

This draft does not standardize conversion goals, drop-off semantics, dwell-time metrics, histograms, sketches, or event taxonomies. Those can be defined by profiles or future modules.

2. Terminology

  • MetricObservation: An addressable observation that attaches one metric value to one metric subject.

  • Metric subject: The UJG object that a metric describes, identified by metricSubjectRef.

  • Metric key: The portable name of the measured fact, identified by metricKey.

  • Count metric: A non-negative integer metric that counts occurrences.

  • Rate metric: A decimal metric in the closed interval 0..1, computed from an explicit numerator and denominator.

  • Mapping-derived metric: A metric computed from one or more JourneyMapping records and their MappedStep records.

  • Source mapping: The JourneyMapping used to compute a single-execution metric, identified by sourceMappingRef when applicable.

3. Metric Model

A MetricObservation records a metric value using these fields:

  • metricSubjectRef: the UJG object that the metric describes.

  • metricKey: the metric name.

  • metricValue: the metric value.

  • metricUnit: the unit of metricValue.

  • numeratorCount: the numerator used to compute a rate metric, when applicable.

  • denominatorCount: the denominator used to compute a rate metric, when applicable.

  • aggregationMethod: the method used to combine or derive an aggregate metric, when applicable.

  • sourceMappingRef: the JourneyMapping used to compute the metric, when the metric is derived from a single mapping.

  1. A MetricObservation MUST identify exactly one metric subject using metricSubjectRef.

  2. A MetricObservation MUST identify exactly one metric key using metricKey.

  3. A MetricObservation MUST provide exactly one metric value using metricValue.

  4. A MetricObservation SHOULD provide metricUnit.

  5. A rate MetricObservation SHOULD provide numeratorCount and denominatorCount.

  6. A single-mapping Mapping-derived metric SHOULD provide sourceMappingRef.

4. Mapping-derived Metrics

Mapping is the canonical interpretation layer for analytics over UJG execution data. Runtime records what happened, Graph defines the intended journey topology, and Mapping resolves each Runtime event to Graph state and transition intent.

Mapping-derived metrics use these primary attachment points:

Attachment pointMeaningAppropriate metrics
JourneyMappingOne interpreted execution chainstepCount, movementCount, explainedMovementCount, unexplainedMovementCount, unexplainedMovementRate, boundaryCrossingCount, maxScopeDepth
MappedStepOne interpreted runtime eventboolean per-step observations such as whether the step is root, explained, or unexplained
JourneyAggregate over mappings resolved to this root journeyexecutionCount, stepCount, unexplainedMovementRate, stateVisitCount, transitionTraversalCount
State or CompositeStateAggregate over mapped steps resolving to this statestateVisitCount, boundaryEntryCount, boundaryExitCount
Transition or OutgoingTransitionAggregate over explained movementstransitionTraversalCount, outgoingTraversalCount

For Mapping-derived metrics, the Runtime event chain defines order. The serialized order of mappedStepRef is not significant.

  1. A Consumer computing Mapping-derived metrics MUST reconstruct mapped step order using the Runtime causal chain of each MappedStep.mappedEventRef.

  2. A Consumer computing Mapping-derived metrics MUST NOT use the serialized order of mappedStepRef as the metric order.

  3. The root mapped step MUST be included in stepCount.

  4. The root mapped step MUST be included in state visit counts for the state resolved by that step.

  5. The root mapped step MUST NOT be included in movementCount, explainedMovementCount, unexplainedMovementCount, or movement-rate denominators.

  6. A non-root mapped step is an explained movement when Mapping semantics determine that its explainedByTransitionRef identifies a relevant effective Transition or OutgoingTransition.

  7. A non-root mapped step is an unexplained movement when Mapping semantics derive a jump for that step.

  8. unexplainedMovementRate MUST be computed as unexplainedMovementCount / movementCount.

  9. If movementCount is zero, unexplainedMovementRate is undefined and MUST NOT be serialized as 0.

5. Core Metric Keys

The following metric keys are core for this draft.

Metric keyUnitSubjectDefinition
stepCountcountJourneyMapping, JourneyNumber of mapped steps, including the root step.
movementCountcountJourneyMapping, JourneyNumber of non-root mapped steps.
explainedMovementCountcountJourneyMapping, JourneyNumber of non-root mapped steps explained by a relevant effective transition.
unexplainedMovementCountcountJourneyMapping, JourneyNumber of non-root mapped steps for which Mapping derives a jump.
unexplainedMovementRateratioJourneyMapping, JourneyunexplainedMovementCount / movementCount.
stateVisitCountcountState, CompositeState, JourneyNumber of mapped steps resolving to the subject state.
transitionTraversalCountcountTransition, JourneyNumber of explained movements whose effective transition is the subject transition.
outgoingTraversalCountcountOutgoingTransition, JourneyNumber of explained movements whose effective transition is the subject outgoing transition.
boundaryEntryCountcountCompositeState, JourneyNumber of mapped movements that enter the subject boundary.
boundaryExitCountcountCompositeState, JourneyNumber of mapped movements that exit the subject boundary.
boundaryCrossingCountcountJourneyMapping, JourneyNumber of mapped movements that enter or exit a journey boundary.
maxScopeDepthcountJourneyMapping, JourneyMaximum nested journey scope depth observed in the mapped execution set.

These keys use unexplainedMovement* terminology rather than jump*, error*, or conversion*. Mapping can derive a jump when no relevant effective transition explains a movement, but Metrics does not classify that movement as an error.

6. Units and Value Conventions

  1. Count metrics MUST use non-negative integer values.

  2. Count metric keys SHOULD NOT use a unit suffix.

  3. Rate metrics MUST use decimal values in the closed interval 0..1.

  4. Rate metrics MUST use ratio as metricUnit.

  5. Duration metrics, when defined by a profile or future module, MUST use integer milliseconds.

  6. Duration metric keys SHOULD end in Ms.

  7. Boolean metrics MUST use true or false values.

  8. Boolean metrics SHOULD be used only for per-step observations, not aggregate counts.

Runtime ordering is causal, not timestamp-based. This draft defines duration value conventions but does not define dwell-time or elapsed-time metric keys as core metrics.

7. Aggregation

Metrics may be computed from one JourneyMapping or aggregated over disjoint sets of mappings. Aggregates must preserve the meaning of the underlying metric key.

  1. Count metrics are additive across disjoint execution sets.

  2. Rate metrics MUST be recomputed from their underlying numerator and denominator.

  3. Consumers SHOULD NOT average precomputed rates unless the averaging method is explicitly declared using aggregationMethod.

  4. For Mapping-derived movement rates, the denominator MUST be movementCount.

  5. For state visit rates, the denominator MUST be declared by the metric definition or profile.

  6. Percentiles, histograms, and sketches are not core Metrics features and MUST NOT be assumed unless a profile defines them.

8. Extension Metric Keys

Profiles and implementations may define additional metric keys for product-specific analytics, domain-specific event taxonomies, or richer statistical summaries.

Extension metric keys SHOULD be namespaced so they do not collide with core metric keys. An extension metric definition SHOULD specify:

  • the metric subject type;

  • the unit and value type;

  • the calculation rule;

  • aggregation behavior;

  • whether the metric is computed from Mapping, Runtime, Graph, or external data.

The following metrics are intentionally profile-defined in this draft:

MetricReason
conversionRateRequires a definition of goal or success semantics.
dropoffRateRequires expected continuation, terminal-state, timeout, session, or cohort semantics.
errorRateMapping does not classify unexplained movement as an error.
dwellTimeMsRequires timestamp or event-time semantics beyond Runtime causal ordering.
retryCountRequires a standardized definition of retry or repeated intent.
frictionScoreRequires a scoring model and event taxonomy.

9. Validation

This draft describes the Metrics model but does not yet publish Metrics ontology, JSON-LD context, or SHACL artifacts. Producers and consumers can still validate the baseline model by checking that:

  • every metric observation has one subject, one key, and one value;

  • count values are non-negative integers;

  • rate values are in the closed interval 0..1;

  • rate observations include or can derive their numerator and denominator;

  • Mapping-derived movement rates use movementCount as the denominator;

  • undefined rates are omitted rather than serialized as 0.

10. Examples

10.1. Unexplained movement rate for one mapping

json
{
  "@id": "urn:ujg:metric:checkout:unexplained-rate",
  "@type": "MetricObservation",
  "metricSubjectRef": "urn:ujg:mapping:execution-12345",
  "metricKey": "unexplainedMovementRate",
  "metricValue": 0.25,
  "metricUnit": "ratio",
  "numeratorCount": 1,
  "denominatorCount": 4,
  "sourceMappingRef": "urn:ujg:mapping:execution-12345"
}
{
  "@id": "urn:ujg:metric:checkout:unexplained-rate",
  "@type": "MetricObservation",
  "metricSubjectRef": "urn:ujg:mapping:execution-12345",
  "metricKey": "unexplainedMovementRate",
  "metricValue": 0.25,
  "metricUnit": "ratio",
  "numeratorCount": 1,
  "denominatorCount": 4,
  "sourceMappingRef": "urn:ujg:mapping:execution-12345"
}

10.2. Traversal count for a transition

json
{
  "@id": "urn:ujg:metric:checkout:transition-cart-payment",
  "@type": "MetricObservation",
  "metricSubjectRef": "urn:ujg:transition:cart-to-payment",
  "metricKey": "transitionTraversalCount",
  "metricValue": 812,
  "metricUnit": "count",
  "aggregationMethod": "sum"
}
{
  "@id": "urn:ujg:metric:checkout:transition-cart-payment",
  "@type": "MetricObservation",
  "metricSubjectRef": "urn:ujg:transition:cart-to-payment",
  "metricKey": "transitionTraversalCount",
  "metricValue": 812,
  "metricUnit": "count",
  "aggregationMethod": "sum"
}

Copyright © 2026 the Contributors to the ujg/metrics/2026.06, published by the User Journal Graph Community Group under the W3C Community Contributor License Agreement (CLA) . A human-readable summary is available.

generated by Speculator