Tracking plans

Monitor your event data with RudderStack tracking plans.

Tracking plans let you proactively monitor and act on non-compliant event data coming into your RudderStack sources based on predefined plans. This can help you prevent or de-risk situations where any missing or improperly configured event data can break your downstream destinations.

Features

  • Set rules for track and non-track events (identify, page, screen, and group) that you want to send to downstream destinations. You can use these rules to:

    • Define which events should pass through, including events with and without properties.
    • Specify whether a property or attribute is required and assign the data type required to pass that event.
  • Use the Event Audit API to evaluate your inbound events and metadata and compare them with your tracking plans.

  • With a robust versioning system, you can iteratively improve your tracking plans and have better control of your data.

  • Create and manage your tracking plans programmatically using the Tracking plan API.

Quickstart

To start using the tracking plans, follow these steps:

  1. Generate a personal access token in your RudderStack dashboard.
  2. Make a copy of the RudderStack tracking plan spreadsheet.
  3. Create a tracking plan from scratch or from your existing event data.
info
You can also use the Tracking plan API to create and manage your tracking plans programmatically.
  1. Connect the tracking plan to a source.
warning

Although you can create unlimited tracking plans, you can have only five source-tracking plan connections in the RudderStack Cloud Growth plan.

To remove this restriction, upgrade to the Enterprise plan.

  1. (Optional) Use RudderTyper for autocomplete and linting.

Manage tracking plans

To see all the tracking plans associated with your workspace, go to Collect > Tracking Plans. In this view, you get all the tracking plan-related details like name, tracking plan ID, version, and last updated time.

Tracking Plan list

Click a tracking plan to view specific details like the linked sources, their status, and the connected destinations. You can also link or unlink a source from a tracking plan.

To link a tracking plan to your source, go to your tracking plan in the RudderStack dashboard and click Link a Source.

Tracking Plan details

Alternatively, you can:

warning
You can link multiple sources to a tracking plan. However, you can connect a source to only one tracking plan at a given point.

To unlink a tracking plan from your source, go to your tracking plan in the RudderStack dashboard and click the linked source. Then, go to the Tracking Plans tab and click Unlink Tracking Plan.

Unlink tracking plan from source

Alternatively, you can use the Tracking plan API to delete the source-tracking plan connection.

Previously linked tracking plans

To view previously linked tracking plans for a source (in the last 30 days), go to the Tracking Plans tab of that source and scroll down to the Previously Applied in the last 30 days section.

Previously linked tracking plans

Tracking plan settings

To edit the tracking plan settings for a linked source, go to the Tracking Plans tab and click Edit Settings.

Tracking plan settings

Here, you can define the tracking plan settings for individual event types. Click Save Settings for the changes to take effect.

Tracking plan settings for track event

The settings are explained below:

Event structure for using tracking plans

By default, RudderStack applies the tracking plan validation on the supported event types as follows:

  • context.traits object for identify events.
  • traits for group events.
  • properties for track, page, and screen events.

If you have instrumented your identify events such that the user traits are captured in the traits object of the events, make sure you select traits as shown, before creating or updating the tracking plan.

Identify validation for traits object

If you’re using the Tracking Plan API, you can also see the example request in the Create Tracking Plan API for the event formatting structure.

Observability

RudderStack gives you complete visibility into the events passing through a tracking plan and details on the tracking plan violations, that is, events that do not comply with the tracking plan rules.

To see these metrics, click the Events tab of the source connected to your tracking plan.

Tracking plan observability

Events ingested

This section shows the tracking plan currently linked to your source and the following details:

  • Total events: Captures all events that pass through the source.
  • Events validated: Number of events validated by the tracking plan.
  • Events with violations: Number of events that do not comply with the tracking plan rules.
  • Events dropped: Number of events dropped due to tracking plan violations.

You can see these metrics for all tracking plans connected to that source and filter them by version and time period (past one day, seven days, or 30 days).

Events ingested section

Event flow

This section gives a graphical overview of all the events ingested per day over the specified period and the number of events with violations.

Event flow section

Event details

Click the Events tab to see all the event-related metrics like:

  • Event name
  • Count: Number of events validated by the tracking plan according to filter set in Events ingested.
  • Last seen: Number of days since the last observed violation.
Events tab

Click the Violations tab to see the following metrics:

Violations tab
  • Event name
  • Event type: Type of event (identify, track, group, page, or screen).
warning
Tracking plans do not validate alias events. If you send any alias events, they are shown in this view and returned as is without validation.
  • Events validated: Number of events validated by the tracking plan according to filter set in Events ingested.
  • Events with violations: Number of events that did not comply with the tracking plan rules.
  • Events dropped: Number of events that were not allowed to flow through.
  • Last occurred: Date and time of the last observed violation.

You can also click on an event to view the violation type and individual metrics.

Tracking plan observability for individual event

Click the View option for more details, like the violation description and sample payload for the violation.

Violation description

Violation types

Violation typeDescription
Unplanned-EventEvent is not defined in the tracking plan.
Required-MissingProperties defined as Required are missing in the event.

Note: O stands for Optional and R stands for Required.
Datatype-MismatchData type of the event property does not match the Property Type defined in the tracking plan.
Additional-PropertiesOccurs if:

  • Additional Properties field in the tracking plan is set to False.
  • New event properties are received that are not defined in the tracking plan.
Unknown-ViolationAny other violation.

For more context on the above violation types, see the example tracking plan:

Example tracking plan

FAQ

Which RudderStack Cloud plans support the tracking plans feature?

The tracking plans feature is supported in the RudderStack Cloud Growth and Enterprise plans.

warning

Although you can create unlimited tracking plans, you can have only five source-tracking plan connections in the RudderStack Cloud Growth plan.

To remove this restriction, upgrade to the Enterprise plan.

Which calls are supported by the tracking plans?

The tracking plans support identify, track, page, screen, and group events.

Note that the alias call is not supported.

RudderStack propagates any context related to the tracking plan violations to your destinations. You can use this context in your transformations for filtering or modifying the events before they reach the destination.



Questions? Contact us by email or on Slack