The contract behind every analytics number: the name and typed properties that travel with a tracking event.
An event schema is the defined structure of a single analytics event: its name, plus the typed properties that travel with it. It is the contract behind every number a team later trusts.
The discipline grew up around the tracking plan, the document that lists every event and property an organisation collects. Segment framed the tracking plan as a contract between product, engineering, marketing, and analytics teams, so everyone agrees on what gets collected and how. The event schema is the per-event unit of that contract.
The first wave of practice was descriptive: write down what you already track. The second wave made the schema enforceable. Segment Protocols validates incoming events against the plan and blocks non-conforming data before it reaches downstream tools. Avo pushed governance earlier still, into design time, where an event and its properties are specified and reviewed before a line of code ships, then published into schema registries and validation tools like Segment Protocols, RudderStack, or Snowplow.
Governance matured alongside scale. Avo's federated model lets a parent organisation keep a core set of events in sync across subsidiaries while each team keeps its own naming conventions for the rest. The field settled on a clear principle: the schema is the artefact you govern, and the metricMetricStrategyA unified metric that measures progress, health, or behaviour across the productView reference → is downstream of it.
A checkout team defines order_completed with four properties: order_id (string, required), revenue (number, required), currency (string, required), coupon_code (string, optional). The schema lives in the tracking plan, reviewed before releaseReleaseProduct SpecificationA shipped version of the productView reference →.
Three months later a mobile engineer ships the same event but sends revenue as a formatted string, "£42.00". The revenue chart flatlines, because the warehouse silently drops the rows it cannot cast to a number. With a validating layer in place, the malformed event is rejected at ingestion and the engineer sees the error in CI, before the data is polluted. The fix takes ten minutes. Without the schema as a gate, the same defect would have taken a week of someone wondering why revenue dropped 30%.
Kleppmann draws the same fault line at the systems level, distinguishing schema-on-write (the store rejects data that does not conform at ingestion) from schema-on-read (structure is only interpreted at query time, so malformed data enters silently and errors surface later). His analysis of schema evolution — how producers and consumers handle added, removed, or retyped fields across deploymentsDeploymentEngineeringA deployment eventView reference → — shows that forward and backward compatibility must be explicit contracts, not assumptionsAssumptionStrategyA belief taken as true that underpins a strategyView reference →; without them, a type change in one service quietly corrupts consumers that were never told.
session_started schema underneath it. Change the schema's definition of a session and the metric shifts without anyone editing the metric.order_completed shape can be emitted by three sources and still resolve to one definition.A note on the common failure: "track everything" produces thousands of ad-hoc events with no shared schema, and the volume looks like rigour while delivering none. A small set of governed schemas is verifiable in a way a sprawl of unverified ones is not.
In the Unified Product Graph, an event schema sits in the data and analytics region as the structured contract for tracked behaviour. A Funnel SteptracksEvent Schemacross-domain edge ties each conversion stage to the event that proves it; funnel_step_tracks_event_schemaProducttracks viaEvent Schemahierarchy records which products emit it; and product_tracks_via_event_schemaData SourceemitsEvent Schemahierarchy names the origin. Modelling the schema as a first-class node, with the funnel and the source hanging off it, makes the lineage queryable: when a metric drifts, you can walk back along these edges to the schema that defines it and find the break.data_source_emits_event_schema
Worked example: Trellis
Trellis standardises its trust and activation tracking through three core events: agent-change-proposed, agent-change-approved, and agent-change-reverted. These schemas define the shape of the data that feeds every dashboardDashboardData & AnalyticsAn analytics dashboardView reference → and metricMetricStrategyA unified metric that measures progress, health, or behaviour across the productView reference → in the product, and they are what makes the audit trail queryable rather than just a log.
Type-specific fields on BaseNode
event_namestringName of the analytics or tracking event
propertiesstring[]Property names included in the event payload
trigger_descriptionstringDescription of what triggers this event
idstringrequiredUnique identifier (UUID)
typeNodeTyperequiredDiscriminator for the entity type
titlestringrequiredDisplay name
descriptionstringOptional detailed description
statusstringLifecycle status
tagsstring[]Freeform tags for filtering
4 phases, initial: draft · template: PUBLISHING
5 edge types connected to this entity.
product_tracks_via_event_schemadata_source_emits_event_schemafunnel_step_tracks_event_schemaevent_schema_tracks_funnel_stepaudit_log_policy_tracks_event_schema