You can update your Tracking Plans by modifying the YAML files in your Data Catalog project. These updates can include:
Adding new events and properties
Modifying validation rules
Removing obsolete tracking
Add new events
Add new events to your Tracking Plan by including additional event rules:
version:rudder/0.1kind:tpmetadata:name:mytrackingplanspec:id:mytrackingplandisplay_name:"Product Tracking Plan"description:"Contains all the events and properties for the Product Tracking Plan"rules:# Existing rules remain unchanged- type:event_ruleid:product_viewed_ruleevent:$ref:"#/events/myeventgroup/product_viewed"properties:- $ref:"#/properties/mypropertygroup/product_sku"required:true# New event rule added- type:event_ruleid:add_to_cart_ruleevent:$ref:"#/events/myeventgroup/add_to_cart"properties:- $ref:"#/properties/mypropertygroup/product_sku"required:true- $ref:"#/properties/mypropertygroup/quantity"required:true
Modify properties
Update property requirements or add new properties to existing events:
rules:- type:event_ruleid:product_viewed_ruleevent:$ref:"#/events/myeventgroup/product_viewed"properties:# Existing properties- $ref:"#/properties/mypropertygroup/product_sku"required:true# New properties added- $ref:"#/properties/mypropertygroup/category"required:false# Modified requirement- $ref:"#/properties/mypropertygroup/price"required:true# Changed from false
You can also remove events or properties by deleting their entries from the YAML file.
Example updates
The following examples show how to update Tracking Plans for different scenarios:
version:rudder/0.1kind:tpmetadata:name:ecommerce_trackingspec:id:ecommerce_trackingdisplay_name:"Ecommerce Tracking"description:"Updated Tracking Plan for ecommerce events"rules:# Existing product view tracking- type:event_ruleid:product_viewed_ruleevent:$ref:"#/events/ecommerce/product_viewed"properties:- $ref:"#/properties/product/sku"required:true- $ref:"#/properties/product/category"required:false# name and price are removed from the properties# New wishlist tracking- type:event_ruleid:wishlist_add_ruleevent:$ref:"#/events/myeventgroup/wishlist_add"properties:- $ref:"#/properties/mypropertygroup/product_sku"required:true- $ref:"#/properties/mypropertygroup/list_id"required:true
version:rudder/0.1kind:tpmetadata:name:user_auth_trackingspec:id:user_auth_trackingdisplay_name:"User Authentication Tracking"description:"Updated Tracking Plan for user authentication events"rules:- type:event_ruleid:user_registered_ruleevent:$ref:"#/events/auth/user_registered"properties:- $ref:"#/properties/user/email"required:true- $ref:"#/properties/user/signup_method"required:true# referral_source is updated to required- $ref:"#/properties/user/referral_source"required:true# Changed from false
Validate and deploy updates
Before deploying your Tracking Plan updates, validate them to ensure they follow the correct structure and meet your requirements.
Validate updates
Run the following command to validate your Tracking Plan updates:
rudder-cli tp validate -l ~/tutorial-catalog
The command checks your Tracking Plan updates for:
Required fields and correct structure
Valid event and property references
Unique identifiers across your catalog
Proper YAML syntax
If validation succeeds, the command returns no output. If it finds any issues, it displays specific error messages to help you fix them.
Deploy updates
After validating your updates, deploy them to your RudderStack workspace:
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.