Skip to content

Commit f7adad3

Browse files
authored
Merge pull request #2402 from segmentio/DOC-434-update-destination-filters-docs
Destination Filter updates [DOC-434]
2 parents 1eea2af + 1bc114d commit f7adad3

File tree

1 file changed

+61
-60
lines changed

1 file changed

+61
-60
lines changed

src/connections/destinations/destination-filters.md

Lines changed: 61 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3,100 +3,100 @@ title: Destination Filters
33
rewrite: true
44
---
55

6-
Destination Filters allow you to control the data flowing into each specific destination by conditionally preventing data from being sent to cloud-mode destinations. You can filter out entire events, or just specific fields in the properties, traits, or in the context of your events.
6+
Destination Filters let you prevent certain data from flowing into a destination.
77

8-
With Destination Filters, you can:
8+
Using Destination Filters, you can conditionally filter out event properties, traits, and fields, or even filter out the event itself.
99

10-
- Control your event volume by sampling or dropping unnecessary events for
11-
specific destinations.
12-
- Manage PII (personally identifiable information) by blocking fields from
13-
reaching certain destinations.
14-
- Increase the relevance of the data in your destinations by removing unused or unwanted data.
15-
- Prevent test or internally-generated events from reaching your production tools.
10+
Common use cases for Destination Filters include the following:
11+
12+
- Managing PII (personally identifiable information) by blocking fields from reaching certain destinations
13+
- Controlling event volume by sampling or dropping unnecessary events for specific destinations
14+
- Increasing data relevance in your destinations by removing unused or unwanted data
15+
- Preventing test or internally-generated events from reaching your production tools
1616

1717
> note ""
18-
> **Note**: Destination Filters are currently available to Business Tier customers only.
18+
> **Note**: Destination Filters are available to Business Tier customers only.
1919
2020
### Destination Filtering Limitations
2121

22-
- Destination Filters can only be applied to Cloud-mode ("server-side") streaming destinations. Device-mode destinations aren't supported.
22+
Keep the following limitations in mind when you use Destination Filters:
23+
24+
- Destination Filters can only be applied to cloud-mode (server-side) streaming destinations. Device-mode destinations aren't supported.
2325
- You can't apply Destination Filters to Warehouses or S3 destinations.
2426
- Each filter can only apply to one source-destination pair.
2527

26-
If you have a compelling use case for these unsupported options, [contact Segment](https://segment.com/help/contact/).
28+
[Contact Segment](https://segment.com/help/contact/) if these limitations impact your use case.
2729

2830
## Create a Destination Filter
29-
To create a Destination Filter:
31+
32+
To create a Destination Filter, follow these steps:
33+
3034
1. Go to **Connections > Destinations** and select your destination.
3135
2. Click on the **Filters** tab of your destination.
3236
3. Click **+ New Filter**.
3337
4. Configure the rules for your filter.
34-
5. *(Optional)* Click **Load Sample Event** to test your filter to see if the event passes through your filter.
38+
5. *(Optional)* Click **Load Sample Event** to see if the event passes through your filter.
3539
6. Click **Next Step**.
3640
7. Name your filter and click the toggle to enable it.
37-
6. Click **Save**.
41+
8. Click **Save**.
3842

3943
## Destination Filters API
4044

41-
The Destination Filters API provides more power than the Destination
42-
Filters settings in the Segment dashboard. You can create complex filters
43-
that are conditionally applied using Segment's "Filter Query Language" (FQL).
45+
The Destination Filters API provides more power than the Segment dashboard's Destination Filters settings. With the API, You can create complex filters that are conditionally applied using Segment's Filter Query Language (FQL).
4446

45-
The Destination Filters API offers these 4 different types of filters:
47+
The Destination Filters API offers four different filter types:
4648

47-
Filter | Details
48-
------ | -------
49-
`drop_event` | Don't send matched events to the destination.
50-
`sample_event` | Send only a percentage of events through to the destination.
51-
`whitelist_fields` | Only send whitelisted properties to the destination.
52-
`blocklist_fields` | Don't send blocklisted properties to the destination.
49+
| Filter | Details |
50+
| ------------------ | ------------------------------------------------------------ |
51+
| `drop_event` | Don't send matched events to the destination. |
52+
| `sample_event` | Send only a percentage of events through to the destination. |
53+
| `whitelist_fields` | Only send whitelisted properties to the destination. |
54+
| `blocklist_fields` | Don't send blocklisted properties to the destination. |
5355

54-
Read more in the [Destination Filters API docs](https://reference.segmentapis.com/#6c12fbe8-9f84-4a6c-848e-76a2325cb3c5).
56+
To learn more, read Segment's [Destination Filters API docs](https://reference.segmentapis.com/#6c12fbe8-9f84-4a6c-848e-76a2325cb3c5).
5557

5658
## Examples
5759

60+
The following examples illustrate common Destinations Filters use cases.
61+
5862
### PII Management
5963

6064
Example: Remove email addresses from `context` and `properties`:
6165

62-
Property-level whitelisting is available using Segment's API. Use this to perform actions like only send certain traits you know have no PII to a destination, and block
63-
all other traits in the context or property fields.
66+
Property-level allowlisting is available with Segment's API. Using Destination Filters, you can configure a rule that removes email addresses from `context` and `properties`. As a result, Segment only sends traits without PII to the destination.
67+
6468

6569
![](images/destination-filters/pii_example.png)
6670

6771
### Control Event Volume
6872

69-
Example: Only send user signed up and demo requested events:
73+
This example shows a filter that controls event volume by only sending `User Signed Up` and `Demo Requested` events.
7074

7175
![](images/destination-filters/drop_example.png)
7276

7377
### Cleaner Data
7478

75-
Example: Only send events - only send track calls to Google Analytics:
79+
This example shows a rule that only sends track calls to Google Analytics.
7680

7781
![](images/destination-filters/clean_example.png)
7882

7983
### Remove Internal and Test Events From Production Tools
8084

81-
Example: Don't send events when the email contains `@segment.com`:
85+
This rule targets email addresses with internal domains to stop test events from reaching Destinations.
8286

8387
![](images/destination-filters/internal_example.png)
8488

85-
Example: Don't send events when the `Order Completed` and `properties.email` contain `@segment.com`.
89+
This rule prevents an event from sending if `Order Completed` and `properties.email` contain an internal `@segment.com` email address.
8690

8791
![](images/destination-filters/internal_example2.png)
8892

8993
### Sample a Percentage of Events
9094

91-
Example: Randomly sample video heartbeat events:
92-
93-
Note: Random sampling can currently only be created using Segment's API: [Full API
94-
docs here](https://reference.segmentapis.com/#6c12fbe8-9f84-4a6c-848e-76a2325cb3c5)
95+
Using the [Destination Filters API](https://reference.segmentapis.com/#6c12fbe8-9f84-4a6c-848e-76a2325cb3c5), you can create a rule to randomly sample video heartbeat events.
9596

9697
### Drop Events
9798

98-
[This video](https://www.youtube.com/watch?v=47dhAF1Hoco) shows an example of
99-
filtering events sent to a destination based on the name of the event.
99+
[Watch this Destination Filters walkthrough](https://www.youtube.com/watch?v=47dhAF1Hoco) to learn how to use event names to filter events sent to destinations.
100100

101101
## Important Notes
102102

@@ -108,49 +108,50 @@ In the example in the video above, if you have a Destination Filter that filters
108108

109109
**Error handling**
110110

111-
Segment makes effort to ensure that Destination Filters handle unexpected
112-
situations. For example, if you use the `contains()` FQL function on
113-
a field and that field is `null`, Segment returns `false` instead of returning an error. If Segment can't reasonably infer your intent, Segment logs an internal error, and drops the event. Segment defaults to this behavior to prevent sensitive information, for example from a PII filter, from getting through.
111+
Segment makes effort to ensure that destination filters handle unexpected situations. For example, if you use the `contains()` FQL function on `null` field, Segment returns `false` instead of returning an error. If Segment can't infer your intent, Segment logs an internal error and drops the event. Segment defaults to this behavior to prevent sensitive information, like a PII filter, from getting through.
114112

115-
Errors aren't exposed in the Event Deliverability tab of your Destination. For help diagnosing unexpectedly missing events when using Destination Filters, [contact Segment](https://segment.com/help/contact/).
113+
Errors aren't exposed in your Destination's Event Deliverability tab. For help diagnosing missing destination filter events, [contact Segment](https://segment.com/help/contact/).
116114

117115
## FAQ
118116

119-
**Q: How does destination filters work with array properties?**
117+
**How do Destination Filters work with array properties?**
120118

121-
Destination Filters can filter properties out of objects nested in an array. For
122-
example, you can filter out the `price` property of every object in an array at `properties.products`. You can also filter out an entire array from the payload. However, you can't drop nested objects in an array, or filter properties out of a single object in an array.
119+
Destination filters can filter properties out of objects nested in an array. For example, you can filter out the `price` property of every object in an array at `properties.products`. You can also filter out an entire array from the payload. However, you can't drop nested objects in an array or filter properties out of a single object in an array.
123120

124-
In order to block a specific property from all of the objects within a properties array, set the filter following the format: `<propertyType>.<arrayName>.<arrayElementLabel>​`.
121+
To block a specific property from all of the objects within a properties array, set the filter using the following the format: `<propertyType>.<arrayName>.<arrayElementLabel>​`.
125122

126123
For example, the `properties.products.newElement` filter blocks all `newElement` property fields from each `products` object of an array within the `properties` object of a Track event.
127124

128125
![](images/destination-filters/filter-array-properties.png)
129126

130-
If you want to block the Identify event trait `products.newElement`, select the option under the **User Traits** list instead. If you want to block a context object field `products.newElement`, select it from the **Context Fields** list.
127+
To block the Identify event trait `products.newElement`, select the option under the **User Traits** list instead. To block a context object field `products.newElement`, select it from the **Context Fields** list.
128+
129+
**How many filters can I create?**
130+
131+
Segment supports 10 filters per destination. If you need help consolidating filters or would like to discuss your use case, [contact Segment](https://segment.com/help/contact/).
132+
133+
**How many properties can I view in the filter dropdown?**
131134

132-
**Q: How many filters can I create?**
135+
Segment displays the most recent 15,000 properties. To find a property not in the filter dropdown, enter the property manually.
133136

134-
You are limited to 10 filters per destination. If you need help
135-
consolidating filters or would like to discuss your use case, [contact Segment](https://segment.com/help/contact/)!
137+
**How can I filter out warehouse events?**
136138

137-
**Q: When will you support warehouses?**
139+
To filter out events from warehouses, use Selective Sync.
138140

139-
If you want to filter out events from warehouses, the best way to do that is with the existing Selective Sync feature.
141+
**I don't see a `name` property at the top level of my events to filter on "event name".**
140142

141-
**Q: I don't see a "name" property at the top level of my events to filter on "event name".**
143+
Generally, only Track calls have "name" properties, which correspond to the "Event" field in an event.
142144

143-
Generally, only Track calls have "name" properties, which corresponds to the
144-
"Event" field in an event.
145+
**How can I find out when new Destination Filters have been added or removed?**
145146

146-
**Q: How can I find out when new filters have been added or removed from a destination?**
147+
The activity feed shows the action, date, and user who performed the action when a Destination Filter is created, modified, enabled, disabled, or deleted. You can also subscribe to notifications for any of these changes in the Activity Feed settings page.
147148

148-
The Activity Feed shows the action, date, and user who performed the action when a Destination Filter is created, modified, enabled, disabled, or deleted. You can also subscribe to notifications for any of these changes in the **Activity Feed** settings page.
149+
The Activity Feed shows the user, date, and action performed when a Destination Filter is created, modified, enabled, disabled, or deleted.
149150

150-
**Q: Why am I getting a permissions denied error when trying to save a filter?**
151+
**Why am I getting a permissions denied error when I try to save a filter?**
151152

152-
Anyone with `read` access on the source can view and test filters, but only users with `write` access can edit filters.
153+
You must have write access to save and edit filters; read permission allows viewing and testing access only.
153154

154-
**Q: How can I test that my filter is working?**
155+
**How can I test my filter?**
155156

156-
Use the Destination Filter tester (in the destination filter set up screens) to test if you are filtering out the right events. Filtered events still show up in the schema page, but aren't counted in the Event Deliverability graphs.
157+
Use the Destination Filter tester during setup to verify that you're filtering out the right events. Filtered events show up on the schema page but aren't counted in event deliverability graphs.

0 commit comments

Comments
 (0)