Event Infrastructure

The missing enforcement layer
in modern analytics stacks.

Versioned business events
Runtime schema validation
Client / server parity
Consent as data
02 The Problem

Dashboards run on events.
Events run on hope.

What exists
Tag managersorchestrate triggers
CDPscentralize payloads
Warehousesstore events
BI toolsvisualize aggregates

None enforce contracts at emission.

What breaks
×Events renamed silently
×Breaking changes without versioning
×Inconsistent payloads per environment
×Consent state untraceable
×Silent drops — no observability

This is not a tooling flaw.
It is a missing architectural layer.

03 The Missing Layer

Analytics needs an explicit enforcement layer.

Event Infrastructure sits between semantic definition and vendor routing. It enforces contracts before dispatch — regardless of which tools consume the data.

"Instrumentation collects.
Infrastructure guarantees."
Stack Architecture
01Governance LayerTracking Plans, Data Contracts
02Semantic LayerDomain Packs, Event Definitions
03EVENT INFRASTRUCTURE LAYERdeklatrak
04RuntimeBrowser · Server · Edge
05ToolingGA4 · Matomo · Warehouse · CDPs
04 Core Principles

Infrastructure is defined
by guarantees.

Every property of Event Infrastructure is an enforced invariant — not a goal, not a recommendation.

01
Events Are APIs

If APIs require contracts and versioning, business events do too. The discipline is identical — only the cultural acceptance is delayed.

Explicit SemVer on every event
Multi-version coexistence
No in-place mutation
02
Validation Before Routing

Documentation is not enforcement. Validation happens before dispatch — deterministically, at the point of emission.

Strict and Warn modes
Deterministic failure paths
No silent drift
03
Client / Server Equivalence

A canonical event must be structurally identical across browser, server, and edge. One runtime. Multiple adapters.

One canonical envelope
Environment-resolved context
Adapter isolation
04
Consent as Structural Property

Consent is not a UI banner. It is embedded in the payload. Adapters requiring consent cannot receive events without granted state.

Consent state in payload
Purpose as machine-readable attribute
Adapter-level enforcement
05
Vendor Neutrality

Canonical events outlive tools. Infrastructure must not depend on vendors — vendors depend on structure.

Adapter pattern — not SDK lock-in
Tooling changes, schema persists
Open specification
05 The Pipeline

track() is not a
fire-and-forget call.

Each step in the pipeline is explicit. Each invariant is enforced before the next step begins. No vendor SDK executes before structural validation.

→ Read the Architecture Review
Runtime Pipeline — Canonical Order
// Every track() call resolves this exact sequence
track("application_submitted", {
  position_id: "job_123",
  source:      "landing_page"
})
  → resolveDefinition    // schema registry lookup
  → resolveConsent       // consent state embedded
  → resolveContext       // environment invariants
  → buildCanonicalEnvelope
  → validate             // strict — fails hard
  → applyMiddleware
  → dispatchAdapters     // vendor-agnostic
06 Maturity Model

Where does your tracking maturity stand?

Most engineering teams operate at Level 2 or 3 — coordinating events through documentation and tag managers, without runtime guarantees.

Event Infrastructure defines Level 5: a deterministic, observable runtime that treats business events with the same discipline as versioned APIs.

1
Ad-hoc Snippets
Copy-pasted vendor scripts. No structure.
2
Centralized Tag Manager
GTM or similar. Routing without contracts.
Most Teams
3
Spreadsheet Tracking Plans
Documentation exists. No runtime enforcement.
Common
4
Versioned Event Schemas
Schemas defined. Partial validation in place.
5
Observable Event Infrastructure
Canonical runtime. Full enforcement. Drift detection.
Target
07 Open Standard

Open specification.
Inspectable runtime.

Standards must be open. Trust requires transparency. Operations may be commercial — but the canonical specification belongs to the ecosystem.

Canonical Event Spec
Open SDKs
Public ADRs
Transparent evolution
Install the canonical runtime
# npm
npm install @deklatrak/browser
// Minimal example
import { track } from "@deklatrak/browser"

track("application_submitted", {
  position_id: "123",
  source:      "landing_page"
})
→ Join GitHub Discussions
Event Infrastructure is inevitable.

Instrumentation collects.
Infrastructure guarantees.

Dashboards are built on events. If events drift, decisions drift. The question is not whether the enforcement layer will exist. The question is who defines it.