You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/protocols/tracking-plan/create.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The Segment Tracking Plan feature allows you to validate your expected events ag
15
15
16
16
Tracking Plans are stored in workspaces and can be connected to one or more Sources.
17
17
18
-

18
+

19
19
20
20
## Create a Tracking Plan
21
21
@@ -70,7 +70,7 @@ You can apply `key:value` labels to each event to help organize your tracking pl
70
70
71
71
For consistency purposes, it's best that you create a standard way of labeling events and share it with all parts of your organization that will use Segment.
72
72
73
-

73
+

74
74
> info ""
75
75
> **Note:** Tracking Plan Labels are only available for Track and Page events.
76
76
@@ -179,19 +179,19 @@ This can be helpful for mobile developers who might have several released versio
179
179
180
180
For example, say you want to add `subtotal` as a required property to your `Order Completed` event. You would start by adding the required property to the event in the Tracking Plan as shown in the example below.

183
183
184
184
Before Segment introduced event versioning, you would need to add the change to your tracking plan and any non-compliant events would generate violations, and possibly be blocked depending on your [event blocking settings](/docs/protocols/enforce/schema-configuration/).
185
185
186
186
### Create a new event version
187
187
With event versioning, you can now create multiple versions of the event definition as shown in the example below. To create a new event version, click into the overflow menu for an event and select **Add Event Version**.
188
188
189
-

189
+

190
190
191
191
### Dynamically validate track events against an event version
192
192
To ensure the Track events you send to a Segment source validate against the correct event version, you need to instrument your events to include a `context.protocols.event_version` key and version value. The version value must pass as an integer, and should match the number shown in the Tracking Plan version tab. In the example below, the version number would be **2**.
193
193
194
-

194
+

195
195
196
196
Next, add the event version number to the context object. For [analytics.js](/docs/connections/sources/catalog/libraries/website/javascript) Track calls, you would instrument the event as in the example below. Note how the JSON objects for `context`, `protocols`, and `event_version` are nested.
0 commit comments