TrackingPlan
A Segment tracking plan that defines and enforces event schemas, property requirements, and data quality standards across all sources.
TrackingPlan
A Segment tracking plan that defines and enforces event schemas, property requirements, and data quality standards across all sources.
Properties
id(string): Unique identifier for the tracking plan.name(string): Name of the tracking plan.slug(string): URL-friendly identifier for the tracking plan.description(string): Description of the tracking plan's purpose and scope.workspace(string): Workspace ID this tracking plan belongs to.status(string): Tracking plan status (draft, published, archived).enabled(boolean): Whether tracking plan validation is enabled.schemas([[EventSchema]][]): Event schemas defined in this tracking plan.sources([[Source]][]): Sources this tracking plan applies to.version(string): Current version of the tracking plan.previousVersions(object[]): Historical versions of the tracking plan.createdAt(string): ISO 8601 timestamp when tracking plan was created.updatedAt(string): ISO 8601 timestamp when tracking plan was last updated.publishedAt(string): ISO 8601 timestamp when tracking plan was published.createdBy(string): User ID who created the tracking plan.metadata(object): Tracking plan metadata and custom properties.validationMode(string): Validation mode (advisory, enforcement).violations(object[]): Recent schema violations detected.violationRate(number): Percentage of events with violations.coverage(number): Percentage of events with defined schemas.eventCount(number): Total number of events tracked.schemaCount(number): Total number of schemas defined.tags(string[]): Tags for categorizing tracking plans.alerts(object[]): Alert configurations for violations.integrations(object[]): Integration settings (GitHub, Jira, Slack).
Actions
create
Create a new tracking plan.
Input: [[TrackingPlan]]
Output: [[TrackingPlan]]
update
Update tracking plan configuration.
Input: [[TrackingPlan]]
Output: [[TrackingPlan]]
delete
Delete a tracking plan.
Input: [[TrackingPlan]]
Output: [[TrackingPlan]]
publish
Publish tracking plan to start enforcement.
Input: [[TrackingPlan]]
Output: [[TrackingPlan]]
archive
Archive tracking plan.
Input: [[TrackingPlan]]
Output: [[TrackingPlan]]
enable
Enable tracking plan validation.
Input: [[TrackingPlan]]
Output: [[TrackingPlan]]
disable
Disable tracking plan validation.
Input: [[TrackingPlan]]
Output: [[TrackingPlan]]
addSchema
Add event schema to tracking plan.
Input: [[EventSchema]]
Output: [[TrackingPlan]]
removeSchema
Remove event schema from tracking plan.
Input: [[EventSchema]]
Output: [[TrackingPlan]]
updateSchema
Update event schema in tracking plan.
Input: [[EventSchema]]
Output: [[TrackingPlan]]
getViolations
Get violations for time period.
Input: [[ViolationQuery]]
Output: [[TrackingPlanViolation]][]
generateReport
Generate tracking plan compliance report.
Input: [[ReportRequest]]
Output: [[TrackingPlanReport]]
compare
Compare tracking plan versions.
Input: [[ComparisonRequest]]
Output: [[TrackingPlanComparison]]
export
Export tracking plan as JSON/YAML.
Input: [[TrackingPlan]]
Output: [[ExportedPlan]]
import
Import tracking plan from JSON/YAML.
Input: [[ImportedPlan]]
Output: [[TrackingPlan]]
Events
created: Triggered when a tracking plan is created.updated: Triggered when tracking plan is updated.deleted: Triggered when a tracking plan is deleted.published: Triggered when tracking plan is published.archived: Triggered when tracking plan is archived.enabled: Triggered when validation is enabled.disabled: Triggered when validation is disabled.schemaAdded: Triggered when schema is added.schemaRemoved: Triggered when schema is removed.schemaUpdated: Triggered when schema is updated.violated: Triggered when event violates tracking plan.exported: Triggered when tracking plan is exported.imported: Triggered when tracking plan is imported.