The Silent Data Quality Crisis
CDPs degrade silently. A developer renames an event. Another team adds a new property with a different format. The mobile team starts sending "purchase_complete" while the web team sends "Order Completed." None of these feel like crises — but three months later, your audience segments are broken, your ad matching lists are empty, and your email triggers aren't firing.
Data contracts are the solution. They're formal agreements between data producers (engineering teams who fire events) and data consumers (analytics, marketing, data engineering teams who use that data) that define exactly what every event must look like.
Our CDP implementation team now treats data contracts as a non-negotiable deliverable in every implementation.
What a Data Contract Defines
For each event in your tracking plan, a data contract specifies:
- Event name: Exact string, case-sensitive ("Order Completed" not "order_completed")
- Required properties: Must be present or the event is rejected
- Optional properties: Present when available
- Property types: String, number, boolean, ISO date — enforced at ingestion
- Allowed values: Enumerations for categorical properties (currency must be valid ISO code)
- Property naming convention: snake_case or camelCase, consistently enforced
Violations are either blocked (strict mode) or flagged with alerts (soft enforcement). Both approaches are better than the default: silent acceptance of bad data.
Where Contracts Live: Tools
Segment Protocols
Segment's built-in schema enforcement tool. Define your Tracking Plan in the Protocols UI, and Segment will block or flag events that don't match. Violations are logged for review. Requires Segment Business tier.
Avo
A dedicated tracking plan and data contract tool that generates typed tracking code from the plan definition. Engineers implement tracking using the generated functions — making type violations impossible at the code level rather than caught at runtime. Works with Segment, RudderStack, and other destinations.
Tracking Plan in Version Control
For teams without dedicated tools: maintain a JSON or YAML tracking plan file in a git repository. Use automated tests that run against event payloads to validate schema compliance in CI/CD pipelines before code ships.
Great Expectations / dbt Tests
For warehouse-side validation: write dbt tests or Great Expectations checks that run against your raw events table in BigQuery. Alert when unexpected nulls, type mismatches, or value anomalies appear.
The Contract Governance Process
A data contract is only as good as the process around it:
- Contract proposal: Any team wanting to add or modify an event submits a proposal
- Review: Data engineering or analytics reviews for consistency with existing schema
- Approval: Stakeholders sign off before implementation begins
- Version control: Contract changes tracked in git with PR review
- Breaking change protocol: Renaming or removing a property requires migration plan for all consumers
Enforcing Contracts in Practice
Even with tooling, cultural enforcement matters. Teams need to understand why the contract exists:
- Show concrete examples of what breaks when an event schema changes without notice
- Put data quality metrics on a shared dashboard that all teams can see
- Include data contract review in the engineering PR checklist for any feature that touches analytics
The upstream investment in data contracts saves orders of magnitude more time in downstream debugging. If your GTM implementation and CDP are silently accumulating bad data, our team can audit and establish governance. Contact us to set up a data quality framework for your CDP.
Need expert tracking setup?
Our Google Tag Manager experts have delivered 500+ tracking setups with a 98% success rate.
Get a Free Consultation →