Skip to content

Commit 966f907

Browse files
authored
Merge pull request #3362 from segmentio/destinations-sources-overview-fixes
fixes for sources and destinations overview
2 parents 11f6622 + a3a0a9b commit 966f907

File tree

4 files changed

+172
-193
lines changed

4 files changed

+172
-193
lines changed
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
Our Web source (Analytics.js), and our native client-side libraries (iOs, Android, React-native) allow you to choose how you send data to Segment from your website or app. Two ways are available:
1+
Segment's web source (Analytics.js), and native client-side libraries (iOS, Android, React-native) allow you to choose how you send data to Segment from your website or app. There are two ways to send data:
22

3-
- **Cloud-mode**: in this mode, the sources send data directly to the Segment servers, which then translate it for each connected downstream destination, and send it on. Translation is done on the Segment servers, keeping your page size, method count, and load time small.
3+
- **Cloud-mode**: The sources send data directly to the Segment servers, which then translate it for each connected downstream destination, and send it on. Translation is done on the Segment servers, keeping your page size, method count, and load time small.
44

5-
- **Device-mode**: in this mode, you include additional code on your website or mobile app which allows Segment to use the data you collect on the device to make calls directly to the destination tool's API, without sending it to the Segment servers _first_. (You still send your data to the Segment servers, but this occurs asynchronously.) This is also called "wrapping" or "bundling", and it might be required when the source has to be loaded on the page to work, or loaded directly on the device to function correctly. When you use Analytics.js, you can change the device-mode destinations that a specific source sends to from within the Segment web app, without touching any code.
5+
- **Device-mode**: You include additional code on your website or mobile app which allows Segment to use the data you collect on the device to make calls directly to the destination tool's API, without sending it to the Segment servers _first_. (You still send your data to the Segment servers, but this occurs asynchronously.) This is also called *wrapping* or *bundling*, and it might be required when the source has to be loaded on the page to work, or loaded directly on the device to function correctly. When you use Analytics.js, you can change the device-mode destinations that a specific source sends from within the Segment web app, without touching any code.
66

7-
> **Note:** If you use Server source libraries, they only send data directly to Segment in Cloud-mode. (Server library implementations operate in the server backend, and can't load additional destination SDKs.)
7+
8+
<div class="premonition info">
9+
<div class="fa fa-info-circle"></div>
10+
<div class="content">
11+
<p class="header"></p>
12+
<p>If you use Server source libraries, they only send data directly to Segment in Cloud-mode. Server library implementations operate in the server backend, and can't load additional destination SDKs.</p>
13+
</div>
14+
</div>

src/connections/destinations/destination-filters.md

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,32 @@ title: Destination Filters
33
rewrite: true
44
---
55

6-
Use Destination Filters to prevent certain data from flowing into a destination.
7-
8-
With Destination Filters, you can conditionally filter out event properties, traits, and fields, or even filter out the event itself.
9-
10-
Common use cases for Destination Filters include the following:
6+
Use Destination Filters to prevent certain data from flowing into a destination. With Destination Filters, you can conditionally filter out event properties, traits, and fields, or even filter out the event itself.
117

8+
Common use cases for Destination Filters include:
129
- Managing PII (personally identifiable information) by blocking fields from reaching certain destinations
1310
- Controlling event volume by sampling or dropping unnecessary events for specific destinations
1411
- Increasing data relevance in your destinations by removing unused or unwanted data
1512
- Preventing test or internally-generated events from reaching your production tools
1613

17-
> note ""
18-
> Destination Filters are available to Business Tier customers only.
14+
> info ""
15+
> Destination Filters are only available to Business Tier customers.
1916
20-
### Destination filtering limitations
17+
### Limitations
2118

2219
Keep the following limitations in mind when you use Destination Filters:
2320

2421
- Segment applies Destination Filters one at a time in the order that they appear in your workspace.
25-
- Destination Filters can only be applied to cloud-mode (server-side) streaming destinations. Device-mode destinations aren't supported.
22+
- Destination Filters can only be applied to cloud-mode (server-side) streaming destinations.
23+
- Device-mode destinations aren't supported.
2624
- You can't apply Destination Filters to Warehouses or S3 destinations.
2725
- Each filter can only apply to one source-destination pair.
2826

2927
[Contact Segment](https://segment.com/help/contact/){:target="_blank"} if these limitations impact your use case.
3028

3129
## Create a Destination Filter
3230

33-
To create a Destination Filter, follow these steps:
34-
31+
To create a Destination Filter:
3532
1. Go to **Connections > Destinations** and select your destination.
3633
2. Click on the **Filters** tab of your destination.
3734
3. Click **+ New Filter**.
@@ -43,22 +40,28 @@ To create a Destination Filter, follow these steps:
4340

4441
## Destination Filters API
4542

46-
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)](/docs/config-api/fql).
43+
The Destination Filters API provides more power than Segment's dashboard Destination Filters settings. With the API, you can create complex filters that are conditionally applied using Segment's [Filter Query Language (FQL)](docs/api/config-api/fql/).
4744

4845
The Destination Filters API offers four different filter types:
4946

5047
| Filter | Details |
5148
| ------------------ | ------------------------------------------------------------ |
52-
| `drop_event` | Don't send matched events to the destination. |
53-
| `sample_event` | Send only a percentage of events through to the destination. |
54-
| `whitelist_fields` | Only send whitelisted properties to the destination. |
55-
| `blocklist_fields` | Don't send blocklisted properties to the destination. |
49+
| `drop_event` | Doesn't send matched events to the destination. |
50+
| `sample_event` | Sends only a percentage of events through to the destination. |
51+
| `whitelist_fields` | Only sends whitelisted properties to the destination. |
52+
| `blocklist_fields` | Doesn't send blocklisted properties to the destination. |
5653

57-
To learn more, read Segment's [Destination Filters API docs](https://reference.segmentapis.com/#6c12fbe8-9f84-4a6c-848e-76a2325cb3c5){:target="_blank"}.
54+
To learn more, read Segment's [Destination Filters API docs](https://docs.segmentapis.com/tag/Destination-Filters){:target="_blank"}.
5855

5956
## Examples
6057

61-
The following examples illustrate common Destinations Filters use cases.
58+
The following examples illustrate common Destinations Filters use cases:
59+
* [PII management](#pii-management)
60+
* [Control event volume](#control-event-volume)
61+
* [Cleaner data](#cleaner-data)
62+
* [Remove internal and test events from production tools](#remove-internal-and-test-events-from-production-tools)
63+
* [Sample a percentage of events](#sample-a-percentage-of-events)
64+
* [Drop events](#drop-events)
6265

6366
### PII management
6467

@@ -83,39 +86,39 @@ This example shows a rule that only sends track calls to Google Analytics.
8386

8487
### Remove internal and test events from production tools
8588

86-
This rule targets email addresses with internal domains to stop test events from reaching Destinations.
89+
In the example below, the rule targets email addresses with internal domains to stop test events from reaching Destinations.
8790

8891
![Example of a filter that removes internal and test events from production tools](images/destination-filters/internal_example.png)
8992

90-
This rule prevents an event from sending if `Order Completed` and `properties.email` contain an internal `@segment.com` email address.
93+
In the example below, the rule prevents an event from sending if `Order Completed` and `properties.email` contain an internal `@segment.com` email address.
9194

9295
![Internal domain filter example](images/destination-filters/internal_example2.png)
9396

9497
### Sample a percentage of events
9598

96-
Using the [Destination Filters API](https://reference.segmentapis.com/#6c12fbe8-9f84-4a6c-848e-76a2325cb3c5){:target="_blank"}, you can create a rule to randomly sample video heartbeat events.
99+
Using the [Destination Filters API](https://docs.segmentapis.com/tag/Destination-Filters){:target="_blank"}, you can create a rule to randomly sample video heartbeat events.
97100

98101
### Drop events
99102

100103
[Watch this Destination Filters walkthrough](https://www.youtube.com/watch?v=47dhAF1Hoco){:target="_blank"} to learn how to use event names to filter events sent to destinations.
101104

102105
## Important notes
103106

104-
**Conflicting settings**
107+
#### Conflicting settings
105108

106109
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.
107110

108-
In the example in the video above, if you have a Destination Filter that filters Track events _and_ you have the **Use Screen Events as Track Events** setting enabled, `Track` events will be dropped, but `Screen` events still process. The destination settings will transform it into a `Track` event - *after* the filters.
111+
For example, if you have a Destination Filter that filters Track events _and_ you have the **Use Screen Events as Track Events** setting enabled, `Track` events drop, but `Screen` events still process. The destination settings transform it into a `Track` event - *after* the filters.
109112

110-
**Error handling**
113+
#### Error handling
111114

112-
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.
115+
Segment makes effort to ensure that Destination Filters can handle unexpected situations. For example, if you use the `contains()` FQL function on the `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.
113116

114117
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/){:target="_blank"}.
115118

116-
## FAQ
119+
## FAQs
117120

118-
**How do Destination Filters work with array properties?**
121+
#### How do Destination Filters work with array properties?
119122

120123
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.
121124

@@ -125,38 +128,36 @@ For example, the `properties.products.newElement` filter blocks all `newElement`
125128

126129
![Filter array properties](images/destination-filters/filter-array-properties.png)
127130

128-
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.
131+
To block the Identify event trait `products.newElement`, select the option under the **User Traits** list instead. To block the context object field `products.newElement`, select it from the **Context Fields** list.
129132

130-
**How many filters can I create?**
133+
#### How many filters can I create?
131134

132135
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/){:target="_blank"}.
133136

134-
**Can I set multiple `Only Send` Destination Filters?**
137+
#### Can I set multiple `Only Send` destination filters?
135138

136139
Segment evaluates multiple `Only Send` filters against each other and resolves Destination Filters in order. If multiple `Only Send` filters conflict with each other, Segment won't send information downstream.
137140

138-
**How many properties can I view in the filter dropdown?**
141+
#### How many properties can I view in the filter dropdown?
139142

140143
Segment displays the most recent 15,000 properties. To find a property not in the filter dropdown, enter the property manually.
141144

142-
**How can I filter out warehouse events?**
145+
#### How can I filter out warehouse events?
143146

144147
To filter out events from warehouses, use Selective Sync.
145148

146-
**I don't see a `name` property at the top level of my events to filter on "event name".**
147-
148-
Generally, only Track calls have "name" properties, which correspond to the "Event" field in an event.
149+
#### I don't see a *name* property at the top level of my events to filter on *event* name".
149150

150-
**How can I find out when new Destination Filters have been added or removed?**
151+
Generally, only Track calls have *name* properties, which correspond to the *event* field in an event.
151152

152-
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.
153+
#### How can I find out when new Destination Filters have been added or removed?
153154

154-
The Activity Feed shows the user, date, and action performed when a Destination Filter is created, modified, enabled, disabled, or deleted.
155+
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.
155156

156-
**Why am I getting a permissions denied error when I try to save a filter?**
157+
#### Why am I getting a permissions denied error when I try to save a filter?
157158

158-
You must have write access to save and edit filters; read permission allows viewing and testing access only.
159+
You must have write access to save and edit filters. Read permission access only allows viewing and testing access.
159160

160-
**How can I test my filter?**
161+
#### How can I test my filter?
161162

162163
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)