Skip to content

Commit 8ce7bd1

Browse files
Merge pull request #4853 from segmentio/sarahrudy-patch-8
Add info on blocking unplanned identify event
2 parents 6a41c44 + 90ea87e commit 8ce7bd1

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/protocols/enforce/schema-configuration.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,19 @@ For example, if you include a single `subscription_id` property in the `Subscrip
4444

4545
**IMPORTANT: Unplanned property omission is ONLY supported in cloud-mode Destinations. Unplanned properties will not be omitted when sending to device-mode Destinations.**
4646

47-
## Track Calls - JSON Schema Violations
48-
Setting this dropdown to Block Event will ensure that all events with JSON schema violations (for example, missing required properties, incorrect property value data types, or invalid regex patterns) will be blocked. A less aggressive option is to select Omit from the dropdown which will simply remove the offending property from the event.
47+
## Block Track Calls - Common JSON Schema Violations
4948

50-
This is an advanced feature that requires extensive testing and a squeaky clean data set + tracking plan to enable. To get a sense of which events will be blocked, or properties omitted, go to the Violations view for a source and note all events with a violation. For example, if you added a `subscription_id` required property to your `Subscription Cancelled` event in your Tracking Plan, the below track call would be blocked by Protocols, or property omitted, depending on your setting.
49+
> warning "JSON schema violation event blocking only supports cloud-mode destinations"
50+
> Events with invalid properties are not blocked from device-mode destinations.
51+
52+
To block all Track calls that generate a common JSON schema violation:
53+
1. In your Segment workspace, go to **Schema Configuration**, then click **Advanced Blocking Controls** and select **Block Event** from the dropdown.
54+
2. [Edit the underlying JSON schema](/docs/protocols/tracking-plan/create/#edit-underlying-json-schema) and add a rule to the Common JSON Schema definition that you know won't exist in your Track event.
55+
3. Trigger a Track event. Any Track event that generates a common JSON schema violation will be blocked.
56+
57+
Setting the dropdown to **Block Event** ensures that all Track events with JSON schema violations (for example, missing required properties, incorrect property value data types, or invalid regex patterns) are blocked. A less aggressive option is to select **Omit** from the dropdown which removes the offending property from the events.
58+
59+
This is an advanced feature that requires extensive testing and a squeaky clean data set/Tracking Plan to enable. To get a sense of which events will be blocked, or properties omitted, go to the Violations view for a source and note all events with a violation. For example, if you added a `subscription_id` required property to your `Subscription Cancelled` event in your Tracking Plan, the below track call would be either blocked by Protocols, or the property would be omitted, depending on your settings.
5160

5261
```js
5362
analytics.track('Subscription Cancelled', {customer_type: 'enterprise'})
@@ -63,3 +72,14 @@ Setting this dropdown to Omit Traits will ensure that traits not defined in your
6372
```
6473

6574
**IMPORTANT: Unplanned identify trait blocking is ONLY supported in cloud-mode Destinations. Events with invalid traits will not be blocked from sending to device-mode Destinations.**
75+
76+
## Block Identify Calls - Common JSON Schema Violations
77+
78+
> warning "JSON schema violation event blocking only supports cloud-mode destinations"
79+
> Events with invalid properties are not blocked from device-mode destinations.
80+
81+
To block all Identify calls that generate a common JSON schema violation:
82+
1. In your Segment workspace, go to **Schema Configuration**, then click **Advanced Blocking Controls** and select **Block Event** from the dropdown.
83+
2. [Edit the underlying JSON schema](/docs/protocols/tracking-plan/create/#edit-underlying-json-schema) and add a rule to the Common JSON Schema definition that you know won't exist in your Identify event.
84+
3. Trigger an Identify event. Any Identify event that generates a common JSON schema violation will be blocked.
85+
Setting the dropdown to **Block Event** will ensure that all Identify events with JSON schema violations (for example, missing required traits, incorrect property value data types, or invalid regex patterns) will be blocked. A less aggressive option is to select **Omit** from the dropdown which will simply remove the offending property from the event.

0 commit comments

Comments
 (0)