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
+14-9Lines changed: 14 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,30 +3,35 @@ title: Destination Filters
3
3
rewrite: true
4
4
---
5
5
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.
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.
7
14
8
-
Common use cases for Destination Filters include:
15
+
Common use cases for destination filters include:
9
16
- Managing PII (personally identifiable information) by blocking fields from reaching certain destinations
10
17
- Controlling event volume by sampling or dropping unnecessary events for specific destinations
11
18
- Increasing data relevance in your destinations by removing unused or unwanted data
12
19
- Preventing test or internally-generated events from reaching your production tools
13
20
14
-
> info ""
15
-
> Destination Filters are only available to Business Tier customers.
16
-
17
21
### Limitations
18
22
19
23
Keep the following limitations in mind when you use Destination Filters:
20
24
21
25
- 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.
24
26
- You can't apply Destination Filters to Warehouses or S3 destinations.
25
27
- 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**.
26
31
27
32
[Contact Segment](https://segment.com/help/contact/){:target="_blank"} if these limitations impact your use case.
28
33
29
-
## Create a Destination Filter
34
+
## Create a destination filter
30
35
31
36
To create a Destination Filter:
32
37
1. Go to **Connections > Destinations** and select your destination.
@@ -38,7 +43,7 @@ To create a Destination Filter:
38
43
7. Name your filter and click the toggle to enable it.
39
44
8. Click **Save**.
40
45
41
-
## Destination Filters API
46
+
## Destination filters API
42
47
43
48
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
+26-2Lines changed: 26 additions & 2 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).
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.
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.
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,6 +442,30 @@ 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
+38-10Lines changed: 38 additions & 10 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,6 +59,10 @@ 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
+
62
66
## Tracking Methods
63
67
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.
206
210
207
211
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.
332
336
333
-
## Utility Methods
337
+
## Utility methods
334
338
The Analytics Swift utility methods help you work with [plugins](#plugin-architecture) from the analytics timeline. They include:
335
339
- [Add](#add)
336
340
- [Find](#find)
@@ -406,6 +410,30 @@ analytics.flush()
406
410
{% endcodeexampletab %}
407
411
{% endcodeexample %}
408
412
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
+
409
437
## Ad Tracking and IDFA
410
438
[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).
411
439
@@ -416,13 +444,13 @@ let idfaPlugin = IDFACollection()
416
444
analytics.add(plugin: idfaPlugin)
417
445
```
418
446
419
-
## Supported Destinations
447
+
## Supported destinations
420
448
Segment supports these destinations for Analytics Swift, with more to come:
### Can I use the catalog of device-mode destinations from Analytics-iOS?
@@ -431,4 +459,4 @@ No, only the plugins listed above are supported in device-mode for Analytics-Swi
431
459
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.
432
460
433
461
## Changelog
434
-
[View the Analytics-Swift changelog on GitHub](https://github.com/segmentio/analytics-swift/releases).
462
+
[View the Analytics-Swift changelog on GitHub](https://github.com/segmentio/analytics-swift/releases){:target="_blank"}.
Copy file name to clipboardExpand all lines: src/guides/filtering-data.md
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,20 +43,30 @@ 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 are not available for, and do not 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 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.
49
49
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.
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.
52
57
53
58

54
59
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.
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.
56
66
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.
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.
58
68
59
-
## Per-Source Schema Integrations Filters
69
+
## Per-Source schema integrations filters
60
70
61
71
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.
62
72
@@ -68,7 +78,7 @@ The events filtered out of individual destinations using this method still arriv
68
78
69
79
**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.
70
80
71
-
## Schema Event Filters
81
+
## Schema event filters
72
82
73
83
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