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/connections/destinations/destination-filters.md
+41-33Lines changed: 41 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Destination Filters
3
3
rewrite: true
4
4
---
5
5
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 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.
7
7
8
8
With Destination Filters, you can:
9
9
@@ -19,25 +19,37 @@ With Destination Filters, you can:
19
19
20
20
### Destination Filtering Limitations
21
21
22
-
- Destination Filters can only be applied to Cloud-mode ("server-side") streaming destinations. Device-mode destinations are not supported.
23
-
- You cannot apply Destination Filters to Warehouses or S3 destinations.
22
+
- Destination Filters can only be applied to Cloud-mode ("server-side") streaming destinations. Device-mode destinations aren't supported.
23
+
- You can't apply Destination Filters to Warehouses or S3 destinations.
24
24
- Each filter can only apply to one source-destination pair.
25
25
26
-
If you have a compelling use case for these unsupported options, [contact us](https://segment.com/help/contact/).
26
+
If you have a compelling use case for these unsupported options, [contact Segment](https://segment.com/help/contact/).
27
+
28
+
## Create a Destination Filter
29
+
To create a Destination Filter:
30
+
1. Go to **Connections > Destinations** and select your destination.
31
+
2. Click on the **Filters** tab of your destination.
32
+
3. Click **+ New Filter**.
33
+
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.
35
+
6. Click **Next Step**.
36
+
7. Name your filter and click the toggle to enable it.
37
+
6. Click **Save**.
27
38
28
39
## Destination Filters API
29
40
30
-
The Destination Filters API provides even more power than the Destination
41
+
The Destination Filters API provides more power than the Destination
31
42
Filters settings in the Segment dashboard. You can create complex filters
32
43
that are conditionally applied using Segment's "Filter Query Language" (FQL).
33
44
34
-
The Destination Filters API offers four different types of filters:
45
+
The Destination Filters API offers these 4 different types of filters:
35
46
36
-
1.**drop_event**: Do not send matched event to the destination.
37
-
2.**sample_event**: Send only a percentage of events through to the
38
-
destination.
39
-
3.**whitelist_fields**: Only send whitelisted properties to destination.
40
-
4.**blocklist_fields**: Do not send blocklisted properties to destination.
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.
41
53
42
54
Read more in the [Destination Filters API docs](https://reference.segmentapis.com/#6c12fbe8-9f84-4a6c-848e-76a2325cb3c5).
43
55
@@ -47,8 +59,7 @@ Read more in the [Destination Filters API docs](https://reference.segmentapis.co
47
59
48
60
Example: Remove email addresses from `context` and `properties`:
49
61
50
-
Property-level whitelisting is available using our API. Use this to do things
51
-
like only send certain traits you know have no PII to a destination, and block
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
52
63
all other traits in the context or property fields.
53
64
54
65

@@ -61,80 +72,77 @@ Example: Only send user signed up and demo requested events:
61
72
62
73
### Cleaner Data
63
74
64
-
Example: only send events - only send track calls to Google Analytics:
75
+
Example: Only send events - only send track calls to Google Analytics:
65
76
66
77

67
78
68
79
### Remove Internal and Test Events From Production Tools
69
80
70
-
Example: Do not send events when email contains `@segment.com`:
81
+
Example: Don't send events when the email contains `@segment.com`:
[This video](https://www.youtube.com/watch?v=47dhAF1Hoco) shows an example of
88
-
filtering events being sent to a destination based on the name of the event.
99
+
filtering events sent to a destination based on the name of the event.
89
100
90
101
## Important Notes
91
102
92
103
**Conflicting settings**
93
104
94
105
Some destinations offer settings that also allow you to filter data. For example, the Facebook App Events destination allows you to map `Screen` events to `Track` events. Because Destination Filters are evaluated and applied _before_ the Destination settings are applied, they can conflict with your settings.
95
106
96
-
In the example in the video above, if you have a Destination Filter that only allows Track events _and_ you have the "Use Screen Events as Track Events" setting enabled, `Track` events are dropped, but `Screen` events are still processed and are transformed by the destination settings into a `Track` event - *after* the filters.
107
+
In the example in the video above, if you have a Destination Filter that only allows Track events _and_ you have the **Use Screen Events as Track Events** setting enabled, `Track` events are drop, but `Screen` events still process, and the destination settings transform it into a `Track` event - *after* the filters.
97
108
98
109
**Error handling**
99
110
100
-
We make every effort to ensure that Destination Filters handle unexpected
101
-
situations gracefully. For example, if you use the `contains()` FQL function on
102
-
a field and that field is `null`, we return`false` instead of returning an error. If we can't reasonably infer your intent, we log an internal error, and drop the event. We default 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
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.
103
114
104
-
Errors are not exposed in the Event Deliverability tab of your Destination. For help diagnosing unexpectedly missing events when using Destination Filters, [contact us](https://segment.com/help/contact/).
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/).
105
116
106
117
## FAQ
107
118
108
119
**Q: How does destination filters work with array properties?**
109
120
110
121
Destination Filters can filter properties out of objects nested in an array. For
111
-
example, you could 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 cannot drop nested objects in an array, or filter
112
-
properties out of a single object in an array.
122
+
example, you could 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.
113
123
114
124
**Q: How many filters can I create?**
115
125
116
-
You are currently limited to 10 filters per destination. If you need help
117
-
consolidating filters or would like to discuss your use case, [contact us](https://segment.com/help/contact/)!
126
+
You are limited to 10 filters per destination. If you need help
127
+
consolidating filters or would like to discuss your use case, [contact Segment](https://segment.com/help/contact/)!
118
128
119
129
**Q: When will you support warehouses?**
120
130
121
-
If you want to filter out events from warehouses, the best way to do that today
122
-
is with the existing Selective Sync feature.
131
+
If you want to filter out events from warehouses, the best way to do that is with the existing Selective Sync feature.
123
132
124
-
**Q: I don't see a "name" property at the top level of my events to filter on "event name"!**
133
+
**Q: I don't see a "name" property at the top level of my events to filter on "event name".**
125
134
126
135
Generally, only Track calls have "name" properties, which corresponds to the
127
136
"Event" field in an event.
128
137
129
138
**Q: How can I find out when new filters have been added or removed from a destination?**
130
139
131
-
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
132
-
Activity Feed settings page.
140
+
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.
133
141
134
142
**Q: Why am I getting a permissions denied error when trying to save a filter?**
135
143
136
144
Anyone with `read` access on the source can view and test filters, but only users with `write` access can edit filters.
137
145
138
146
**Q: How can I test that my filter is working?**
139
147
140
-
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 are not counted in the Event Deliverability graphs.
148
+
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.
0 commit comments