برنامهریزی، تحلیل و عملیات پلتفرم · فصل ۳ — Events، Performance و Capacity Advisor · 208
Analytics Events, Dimensions and Metric Regimes
Design a versioned analytics contract that binds events and parameters to dimension/metric semantics, units, aggregation, denominator, compatibility and an effective interval, and marks cross-regime comparisons as comparable, bridged or invalid instead of silently treating them as one time series. میتواند برای «Analytics Events, Dimensions و Metric Regimes» model، signal و guardrail لازم را در یک workflow محدود تعریف و ارزیابی کند.
Lesson summary
Design a versioned analytics contract that binds events and parameters to dimension/metric semantics, units, aggregation, denominator, compatibility and an effective interval, and marks cross-regime comparisons as comparable, bridged or invalid instead of silently treating them as one time series.
میتواند برای «Analytics Events, Dimensions و Metric Regimes» model، signal و guardrail لازم را در یک workflow محدود تعریف و ارزیابی کند.
This lesson produces
میتواند برای «Analytics Events, Dimensions و Metric Regimes» model، signal و guardrail لازم را در یک workflow محدود تعریف و ارزیابی کند.
Who it is for
Foundation
Use a guided C03 evidence matrix and one worked negative case.
Repair
Re-run only the failed owned dimension with a smaller deterministic synthetic fixture.
Experienced
Start from conflicting analytics/performance/capacity signals; require explicit trade-offs, uncertainty and provenance.
Prerequisites
1. The real problem: a valid chart with broken meaning
A six-month conversion chart looks continuous, but midway through the period an event parameter was renamed, the denominator changed from sessions to active users, and a high-cardinality campaign dimension was added. The chart still draws one line while the measurement contract has changed. This lesson registers the regime boundaries before interpretation.
2. Lesson boundary
This lesson owns Analytics Event & Metric-Regime Registry v1. It does not absorb the prior experiment model or the next performance-lens/provenance packet. It proves neither KPI causality nor production authorization; it establishes when event/dimension/metric semantics are valid and comparable.
3. An event contract is more than an event name
event_name gains meaning from event_schema_version and its decisive parameters. Google Analytics describes event parameters as contextual data attached to interactions and as inputs that can surface through dimensions or metrics. Renaming a parameter or changing its meaning does not preserve continuity merely because the event name stayed the same.
4. Bind parameter to dimension/metric semantics
Each decisive parameter needs a clear relationship to a dimension or metric and its scope. Dimensions are attributes used to group or filter data; metrics are quantitative measurements. If data is collected but the reporting semantic mapping is unknown, the regime is not auditable and must not be upgraded by guesswork.
5. Metric label is not metric contract
A label such as conversion_rate is insufficient. Record metric_type, unit, numerator, denominator, and aggregation. Conversion per session and conversion per active user are different regimes even when the dashboard title is unchanged.
6. A unit change requires a regime check
Changing ms to s may be a pure conversion or may accompany an instrumentation/aggregation change. Continuity requires an explicit, reversible, testable conversion rule. A unit-label change without mapping stays NOT_COMPARABLE or requires a rebase.
7. Dimension scope and cardinality
Adding a dimension can change data grain. Raw URL and route template are not the same scope, and a high-cardinality campaign identifier may change aggregation behavior and cost. dimension_scope and cardinality belong to the regime, not decorative metadata.
8. Filter set is part of the regime
Two queries with the same metric but different filters are not one series unless an explicit bridge justifies it. Bot exclusion, country filtering, or an include/exclude rule change creates a version boundary or bridge requirement. Hidden filters create hidden, indefensible continuity.
9. Do not confuse API compatibility with semantic compatibility
The Google Analytics Data API exposes dimension/metric metadata and checkCompatibility. That method identifies fields that can coexist in a report request; it does not prove that today's metric definition is semantically identical to the same label last month. Queryable does not mean comparable.
10. OpenTelemetry and semantic ambiguity
OpenTelemetry recommends consistent metric names/attributes, meaningful aggregation, explicit units, and avoidance of semantic ambiguity. This is a useful measurement-discipline reference, not MAKNOW product policy. Product metric meaning still needs its own versioned registry.
11. Effective interval and provenance
Every metric_regime_id has an effective_from and, when closed, effective_to. provenance_ref points to the spec/change request/instrument configuration behind the definition. Missing provenance or stale metadata is never silently current; the registry emits UNKNOWN or STALE_EVIDENCE.
12. Compatibility gate
COMPARABLE requires equivalent event schema, dimension scope, metric type, unit/ratio semantics, aggregation, filter set, and provenance. A known difference with an explicit mapping may become BRIDGED. A semantic break without a bridge is NOT_COMPARABLE; a break that requires a new baseline is REBASE_REQUIRED.
13. Worked example: conversion trend
Regime R1 uses purchase_complete with denominator=sessions. R2 keeps the chart label but changes denominator to active_users and adds campaign_id. The Data API may allow both field sets in reports, yet the registry rejects continuity because denominator and grain changed. Decision=DO_NOT_COMPARE; the new regime must be rebased.
| case | regime_id | event_or_metric | denominator | metric_type | unit | aggregation | dimension_scope | cardinality | bridge | comparison_status | decision |
|---|---|---|---|---|---|---|---|---|---|---|---|
| baseline_same_regime | R1 | purchase_complete | sessions | ratio | 1 | sum/sum | campaign_group | LOW | R1 | COMPARABLE | PRESERVE_SERIES |
| denominator_changed | R2 | purchase_complete | active_users | ratio | 1 | sum/sum | campaign_group | LOW | none | NOT_COMPARABLE | DO_NOT_COMPARE |
| parameter_renamed_no_mapping | R3 | purchase_done | sessions | ratio | 1 | sum/sum | campaign_group | LOW | none | REBASE_REQUIRED | START_NEW_REGIME_REBASE |
| high_cardinality_dimension | R4 | purchase_complete | sessions | ratio | 1 | sum/sum | campaign_id | HIGH | none | REBASE_REQUIRED | START_NEW_REGIME_REBASE |
| compat_api_but_semantics_changed | R5 | purchase_complete | active_users | ratio | 1 | sum/sum | campaign_group | LOW | API_ONLY | NOT_COMPARABLE | DO_NOT_COMPARE |
| transfer_latency_bridge | LAT2 | http.server.request.duration | requests | histogram | s | distribution | route_template | MEDIUM | ms_to_s+route_map | BRIDGED | COMPARE_WITH_BRIDGE |
14. Negative cases
Four shortcuts must fail: parameter rename without mapping; denominator change under a stable label; high-cardinality dimension without a version boundary; and checkCompatibility=OK while metric semantics changed. Stale metadata or missing provenance also cannot be guessed into COMPARABLE.
15. Transfer: API latency from ms to s
The transfer changes latency from milliseconds to seconds and splits route identity from raw URL to route template. If the conversion (ms × 0.001 = s) and dimension mapping are explicit and testable, the registry may emit BRIDGED. Without that bridge, the baseline conclusion cannot be copied and continuity must be broken.
Assessment
There is no answer key in this lesson pack; answer it yourself and mark honestly. "Needs review" sends the lesson to your review queue.
Q1 short_answer
Q2 diagnosis
Q3 application
Q4 transfer
Assessment rubric
Critical dimensions: lesson boundary; event schema/version; dimension scope/cardinality; metric type/unit/numerator/denominator/aggregation; filter set; effective interval; compatibility/bridge rule; provenance; typed non-success state; transfer recomputation. A passing response never treats a stable label or API queryability as semantic continuity.
References & freshness
Case studies
Lab files
PYTHONDONTWRITEBYTECODE=1 python run_checks.py را اجرا کنید. هدف تشخیص comparability، bridge و rebase از Evidence است؛ Answer Key در مسیر learner وجود ندارد.