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
+9-14Lines changed: 9 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,35 +3,30 @@ title: Destination Filters
3
3
rewrite: true
4
4
---
5
5
6
-
> info ""
7
-
> Destination filters are only available to Business Tier customers.
8
-
>
9
-
> Destination filters for mobile device-mode destinations are in beta and only supports [Swift](/docs/connections/sources/catalog/libraries/mobile/swift-ios#destination-filters), [Kotlin](/docs/connections/sources/catalog/libraries/mobile/kotlin-android/#destination-filters) and [React Native 2.0](/docs/connections/sources/catalog/libraries/mobile/react-native/#destination-filters) libraries.
10
-
11
-
Use destination filters to prevent certain data from flowing into a destination. You can conditionally filter out event properties, traits, and fields, or even filter out the event itself.
12
-
13
-
You can configure destination filters on cloud-mode, mobile, and web device-mode and actions-based destinations. With device-mode destinations, you can use the same user interface or API mechanism that you use for your cloud-mode destinations, and have those filters acted upon for device-mode destinations on web and mobile.
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.
14
7
15
-
Common use cases for destination filters include:
8
+
Common use cases for Destination Filters include:
16
9
- Managing PII (personally identifiable information) by blocking fields from reaching certain destinations
17
10
- Controlling event volume by sampling or dropping unnecessary events for specific destinations
18
11
- Increasing data relevance in your destinations by removing unused or unwanted data
19
12
- Preventing test or internally-generated events from reaching your production tools
20
13
14
+
> info ""
15
+
> Destination Filters are only available to Business Tier customers.
16
+
21
17
### Limitations
22
18
23
19
Keep the following limitations in mind when you use Destination Filters:
24
20
25
21
- Segment applies Destination Filters one at a time in the order that they appear in your workspace.
22
+
- Destination Filters can only be applied to cloud-mode (server-side) streaming destinations.
23
+
- Device-mode destinations aren't supported.
26
24
- You can't apply Destination Filters to Warehouses or S3 destinations.
27
25
- Each filter can only apply to one source-destination pair.
28
-
-*(For device-mode)* Destination filters don't apply to items that are added to the payload server-side such as IP addresses.
29
-
-*(For device-mode)* Destination filters don't filter on native events that the destination SDK collects. Instead, you can use the load option to conditionally load relevant bundled JavaScript on the page. See the docs for [load options](/docs/connections/sources/catalog/libraries/website/javascript/#load-options).
30
-
-*(For web device-mode)* Destination filters for web device-mode only supports the Analytics.js 2.0 source. You need to enable device mode destination filters for your Analytics.js source. To do this, go to your Javascript source and navigate to **Settings > Analytics.js** and turn the toggle on for **Destination Filters**.
31
26
32
27
[Contact Segment](https://segment.com/help/contact/){:target="_blank"} if these limitations impact your use case.
33
28
34
-
## Create a destination filter
29
+
## Create a Destination Filter
35
30
36
31
To create a Destination Filter:
37
32
1. Go to **Connections > Destinations** and select your destination.
@@ -43,7 +38,7 @@ To create a Destination Filter:
43
38
7. Name your filter and click the toggle to enable it.
44
39
8. Click **Save**.
45
40
46
-
## Destination filters API
41
+
## Destination Filters API
47
42
48
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/).
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/mobile/kotlin-android/index.md
+2-26Lines changed: 2 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -340,8 +340,8 @@ analytics.add(yourPlugin)
340
340
```
341
341
342
342
### Example projects using Analytics-Kotlin
343
-
See how different platforms and languages use Analytics-Kotlin in different [example projects](https://github.com/segmentio/analytics-kotlin/tree/main/samples){:target="_blank"}.
344
-
The example projects contain sample [plugins](https://github.com/segmentio/analytics-kotlin/tree/main/samples/kotlin-android-app/src/main/java/com/segment/analytics/next/plugins){:target="_blank"} and [destination plugins](https://github.com/segmentio/analytics-kotlin/tree/main/samples/kotlin-android-app-destinations/src/main/java/com/segment/analytics/destinations/plugins){:target="_blank"} you can use.
343
+
See how different platforms and languages use Analytics-Kotlin in different [example projects](https://github.com/segmentio/analytics-kotlin/tree/main/samples).
344
+
The example projects contain sample [plugins](https://github.com/segmentio/analytics-kotlin/tree/main/samples/kotlin-android-app/src/main/java/com/segment/analytics/next/plugins) and [destination plugins](https://github.com/segmentio/analytics-kotlin/tree/main/samples/kotlin-android-app-destinations/src/main/java/com/segment/analytics/destinations/plugins) you can utilize.
345
345
346
346
## Utility methods
347
347
The Analytics-Kotlin utility methods help you work with plugins from the analytics timeline. They include:
@@ -442,30 +442,6 @@ analytics.reset()
442
442
{% endcodeexampletab %}
443
443
{% endcodeexample %}
444
444
445
-
## Destination filters
446
-
> info ""
447
-
> Destination filters are only available to Business Tier customers.
448
-
>
449
-
> Destination filters on mobile device-mode destinations are in beta and only supports Analytics-Kotlin, [Analytics-Swift](/docs/connections/sources/catalog/libraries/mobile/swift-ios/), and [Analytics-React-Native 2.0](/docs/connections/sources/catalog/libraries/mobile/react-native/).
450
-
451
-
Use Analytics-Kotlin (Android) to configure [destination filters](docs/connections/destinations/destination-filters/) on your mobile device-mode destinations.
452
-
453
-
> warning ""
454
-
> Keep [these limitations](/docs/connections/destinations/destination-filters/#limitations) in mind when using destination filters.
455
-
456
-
457
-
To get started with destination filters on mobile device-mode destinations using Kotlin:
> Destination filters are only available to Business Tier customers.
497
-
>
498
-
> Destination filters on mobile device-mode destinations are in beta and only supports Analytics-React-Native 2.0, [Analytics-Swift](/docs/connections/sources/catalog/libraries/mobile/swift-ios/) and [Analytics-Kotlin](/docs/connections/sources/catalog/libraries/mobile/kotlin-android/).
499
-
500
-
Use Analytics-React-Native 2.0 to set up [destination filters](docs/connections/destinations/destination-filters/) on your mobile device-mode destinations.
501
-
502
-
> warning ""
503
-
> You must use Analytics-React-Native version 2.9 or higher to implement destination filters.
504
-
>
505
-
> Keep [these limitations](/docs/connections/destinations/destination-filters/#limitations) in mind when using destination filters.
506
-
507
-
To get started with destination filters on mobile device-mode destinations using Analytics-React-Native 2.0:
508
-
1. Download and install the `@segment/analytics-react-native-plugin-destination-filters` package as a dependency in your project.
2. Follow the instructions for [adding plugins](/docs/connections/sources/catalog/libraries/mobile/react-native/#adding-plugins) on the main Analytics client.
518
-
3. Add `DestinationFiltersPlugin` after you create your Segment client.
Segment supports a large number of [Cloud-mode](/docs/connections/destinations/#connection-modes) destinations. Segment also supports the below destinations for Analytics React Native 2.0 in device-mode, with more to follow:
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/mobile/swift-ios/index.md
+10-38Lines changed: 10 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ If you're migrating to Analytics-Swift from a different mobile library, you can
13
13
> Analytics-Swift currently supports [these destinations](#supported-destinations) in device-mode, with more to follow. Cloud-mode destinations are also supported.
14
14
15
15
16
-
## Getting started
16
+
## Getting Started
17
17
To get started with the Analytics-Swift mobile library:
18
18
19
19
1. Create a Source in Segment.
@@ -59,10 +59,6 @@ To get started with the Analytics-Swift mobile library:
59
59
`trackApplicationLifecycleEvents`| The defaultisset to `true`. <br> This automatically tracks lifecycle events. Set to `false` to stop tracking lifecycle events.
60
60
`trackDeepLinks` | The defaultisset to `true`. <br> This automatically track deep links. Set to `false` to stop tracking Deep Links.
61
61
62
-
63
-
> info ""
64
-
> Configuration options such as IDFA collection and automatic screen tracking are found in Segment's [Plugin Examples repo](https://github.com/segmentio/analytics-example-plugins/tree/main/plugins/swift){:target="_blank"}.
65
-
66
62
## Tracking Methods
67
63
Once you've installed the Analytics-Swift library, you can start collecting data through Segment's tracking methods:
Segment's plugin architecture enables you to modify and augment how the analytics client works. From modifying event payloads to changing analytics functionality, plugins help to speed up the process of getting things done.
210
206
211
207
Plugins are run through a timeline, which executes in order of insertion based on their entry types. Segment has these 5 entry types:
Though you can add plugins anywhere in your code, it's best to implement your plugin when you configure the client.
336
332
337
-
## Utility methods
333
+
## Utility Methods
338
334
The Analytics Swift utility methods help you work with [plugins](#plugin-architecture) from the analytics timeline. They include:
339
335
- [Add](#add)
340
336
- [Find](#find)
@@ -410,30 +406,6 @@ analytics.flush()
410
406
{% endcodeexampletab %}
411
407
{% endcodeexample %}
412
408
413
-
## Destination filters
414
-
> info ""
415
-
> Destination filters are only available to Business Tier customers.
416
-
>
417
-
> Destination filters on mobile device-mode destinations are in beta and only supports Analytics-Swift, [Analytics-Kotlin](/docs/connections/sources/catalog/libraries/mobile/kotlin-android/), and [Analytics-React-Native 2.0](/docs/connections/sources/catalog/libraries/mobile/react-native/).
418
-
419
-
Use Analytics-Swift to set up [destination filters](docs/connections/destinations/destination-filters/) on your mobile device-mode destinations.
420
-
421
-
> warning ""
422
-
> Keep [these limitations](/docs/connections/destinations/destination-filters/#limitations) in mind when using destination filters.
423
-
424
-
To get started with destination filters using Swift:
425
-
1. Add the Swift package `git@github.com:segmentio/DestinationFilters-Swift.git` as a dependency through either of these 2 options:
426
-
1. Your package.swift file
427
-
2. Xcode
428
-
1. Xcode 12:**File > Swift Packages > Add Package Dependency**
429
-
2. Xcode 13:**File > Add Packages...**
430
-
431
-
After you install the package, importthe package with `import DestinationFilters_Swift` to reference the Destination Filters plugin.
432
-
2. Add the plugin.
433
-
```swift
434
-
analytics.add(DestinationFilters())
435
-
```
436
-
437
409
## Ad Tracking and IDFA
438
410
[Segment no longer automatically collects IDFA](/docs/connections/sources/catalog/libraries/mobile/ios/ios14-guide/#segment-no-longer-automatically-collects-idfa). If you need to collect the user's IDFA to pass it to specific destinations, or for other uses, [you can manually pass the IDFA to the Segment SDK](/docs/connections/sources/catalog/libraries/mobile/ios/ios14-guide/#you-can-manually-pass-the-idfa-to-the-segment-sdk).
439
411
@@ -444,13 +416,13 @@ let idfaPlugin = IDFACollection()
444
416
analytics.add(plugin: idfaPlugin)
445
417
```
446
418
447
-
## Supported destinations
419
+
## Supported Destinations
448
420
Segment supports these destinations for Analytics Swift, with more to come:
### Can I use the catalog of device-mode destinations from Analytics-iOS?
@@ -459,4 +431,4 @@ No, only the plugins listed above are supported in device-mode for Analytics-Swi
459
431
When you successfully package a plugin in device-mode, you will no longer see the integration listed as `false` in the integrations object for a Segment event. This logic is now packaged in the event metadata, and is not surfaced in the Segment debugger.
460
432
461
433
## Changelog
462
-
[View the Analytics-Swift changelog on GitHub](https://github.com/segmentio/analytics-swift/releases){:target="_blank"}.
434
+
[View the Analytics-Swift changelog on GitHub](https://github.com/segmentio/analytics-swift/releases).
Copy file name to clipboardExpand all lines: src/guides/filtering-data.md
+8-18Lines changed: 8 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,30 +43,20 @@ Note that destination flags are **case sensitive** and match the destination's n
43
43
44
44
Your data is sent to your warehouse (if you have one) and into the Segment backend systems regardless of what is in the integrations object.
45
45
46
-
## Destination filters
46
+
## Destination Filters
47
47
48
-
[Destination filters](https://segment.com/docs/connections/destinations/destination-filters/) allow you to control the data flowing into each specific destination, by examining event payloads, and conditionally preventing data from being sent to destinations. You can filter out entire events, or just specific fields in the properties, in the traits, or in the context of your events. Destination filters support cloud-based (server-side), actions-based, and mobile and web device-mode destinations. Destination filters aren't available for, and don't prevent data from reaching your warehouse(s) or S3 destinations.
48
+
[Destination Filters](https://segment.com/docs/connections/destinations/destination-filters/) allow you to control the data flowing into each specific destination, by examining event payloads, and conditionally preventing data from being sent to destinations. You can filter out entire events, or just specific fields in the properties, in the traits, or in the context of your events. Destination filters are not available for, and do not prevent data from reaching your warehouse(s) or S3 destinations.
49
49
50
-
> info ""
51
-
> Destination filters are only available in workspaces that are on a Business Tier plan.
52
-
>
53
-
> Destination filters for mobile device-mode destinations are in beta and only supports [Swift](/docs/connections/sources/catalog/libraries/mobile/swift-ios#destination-filters), [Kotlin (Android)](/docs/connections/sources/catalog/libraries/mobile/kotlin-android/#destination-filters), and [React Native 2.0](/docs/connections/sources/catalog/libraries/mobile/react-native/#destination-filters) libraries.
54
-
55
-
> warning ""
56
-
> Keep [these limitations](/docs/connections/destinations/destination-filters/#limitations) in mind when using destination filters.
50
+
> note ""
51
+
> **Note**: Destination Filters are available in workspaces that are on a Business Tier plan only. Destination Filters can only be applied to Cloud-mode ("server-side") streaming destinations. Device-mode destinations are not supported.
57
52
58
53

59
54
60
-
To set up destination filters from the Segment web app for the destination from which you want to exclude data:
61
-
1.*(For web device-mode destinations only)* Enable device mode destination filters for your Analytics.js source. To do this, go to your Javascript source and navigate to **Settings > Analytics.js** and turn the toggle on for **Destination Filters**.
62
-
***NOTE:** Destination filters for web device-mode only supports the Analytics.js 2.0 source.
63
-
2. Navigate to **Connections > Destinations** and select the destination you want to set up filters for.
64
-
3. Go to the **Filters** tab and click **+ New Filter** to create a destination filter.
65
-
See the [Destination Filters documentation](/docs/connections/destinations/destination-filters/) for more details.
55
+
You can set up Destination Filters from the Segment web app by navigating to the destination from which you want to exclude the data, and clicking the **Destination Filters** tab. From there you can create new filter rules, and edit, enable, and disable existing filters. See the [Destination Filters documentation](https://segment.com/docs/connections/destinations/destination-filters/) for more details.
66
56
67
-
You can set up destination filters using the options presented in the Segment web app, or using Segment's Filter Query Logic (FQL). If you use FQL, your query syntax is limited to 5kb per query.
57
+
You can set up Destination filters using the options presented in the Segment web app, or using Segment's Filter Query Logic (FQL). If you use FQL, your query syntax is limited to 5kb per query.
68
58
69
-
## Per-Source schema integrations filters
59
+
## Per-Source Schema Integrations Filters
70
60
71
61
Integration filters allow you to quickly change which destinations receive specific Track, Identify, or Group events. Access this tool in any Source that is receiving data by navigating to the Schema tab. Schema integration filters are available to workspaces that are on a Business Tier plan only.
72
62
@@ -78,7 +68,7 @@ The events filtered out of individual destinations using this method still arriv
78
68
79
69
**Integration filters are all-or-nothing for each event.** If you require more detailed control over which events are sent to specific destinations, you can use Destination Filters to inspect the event payload, and conditionally drop the data or forward it to the destination.
80
70
81
-
## Schema event filters
71
+
## Schema Event Filters
82
72
83
73
You can use Schema Event Filters to discard and permanently remove Page, Screen and Track events from event-based sources, preventing them from reaching any destinations or warehouses. Use this if you know that you'll never want to access this data again. This functionality is similar to filtering with the Integrations object, however it can be changed from within the Segment app without touching any code.
0 commit comments