Governance

Schema validation, deploy diffs, and event catalog

Realanalytics treats your analytics schema as code. The governance layer adds validation, diffing, and visibility to ensure schema changes are safe and intentional.

Lint your schema

Run realanalytics lint to validate your analytics definitions before deploying.

npx realanalytics lint

The linter checks for:

CheckSeverityDescription
Event referencesErrorDashboard widgets reference events that exist in your schema
Property referencesErrorBreakdown properties exist on the referenced event
Naming conventionsErrorEvent names are lowercase alphanumeric with underscores
Unused eventsWarningEvents defined but not referenced by any dashboard widget

CI integration

Add npx realanalytics lint to your CI pipeline. It exits with code 1 on errors, making it easy to gate deployments on schema validity.

Deploy diffs

When you run realanalytics deploy, the CLI now shows a structured diff of what changed compared to the previous deployment.

$ npx realanalytics deploy

  Schema Diff:

    Events:
      [+] checkout_started
          [+] cart_value (number)
          [+] item_count (number)
      [~] signup_completed
          [+] referral_source (string)
          [-] legacy_field

    Dashboards:
      [~] overview
          [~] widget: conversion_funnel
          [+] widget: checkout_metrics

  ⚠ Breaking Changes:
    [!] signup_completed.legacy_field: Property removed but still referenced by dashboard widgets

Event Catalog

The Event Catalog page (/{projectId}/catalog) shows all defined events from your latest schema deployment. Access it from the sidebar in any dashboard.

The catalog shows:

  • All event names with descriptions
  • Properties with types and required status
  • Which dashboards reference each event
  • Autocapture and conversion badges
  • Deploy history with expandable diffs

Schema versioning

Every deploy creates a versioned schema snapshot. The deploy history timeline shows what changed in each version, including field-level diffs and breaking change warnings.

Next Steps