Skip to content

Commit 516769c

Browse files
authored
Merge pull request #3674 from segmentio/revert-3598-DOC-589
Revert "Mobile Device Mode Destination Filters Beta (Swift, Kotlin, React Native 2.0) [DOC-589]"
2 parents 125a2f1 + 3f26040 commit 516769c

File tree

5 files changed

+29
-135
lines changed

5 files changed

+29
-135
lines changed

src/connections/destinations/destination-filters.md

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

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.
147

15-
Common use cases for destination filters include:
8+
Common use cases for Destination Filters include:
169
- Managing PII (personally identifiable information) by blocking fields from reaching certain destinations
1710
- Controlling event volume by sampling or dropping unnecessary events for specific destinations
1811
- Increasing data relevance in your destinations by removing unused or unwanted data
1912
- Preventing test or internally-generated events from reaching your production tools
2013

14+
> info ""
15+
> Destination Filters are only available to Business Tier customers.
16+
2117
### Limitations
2218

2319
Keep the following limitations in mind when you use Destination Filters:
2420

2521
- 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.
2624
- You can't apply Destination Filters to Warehouses or S3 destinations.
2725
- 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**.
3126

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

34-
## Create a destination filter
29+
## Create a Destination Filter
3530

3631
To create a Destination Filter:
3732
1. Go to **Connections > Destinations** and select your destination.
@@ -43,7 +38,7 @@ To create a Destination Filter:
4338
7. Name your filter and click the toggle to enable it.
4439
8. Click **Save**.
4540

46-
## Destination filters API
41+
## Destination Filters API
4742

4843
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/).
4944

src/connections/sources/catalog/libraries/mobile/kotlin-android/index.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ analytics.add(yourPlugin)
340340
```
341341

342342
### 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.
345345

346346
## Utility methods
347347
The Analytics-Kotlin utility methods help you work with plugins from the analytics timeline. They include:
@@ -442,30 +442,6 @@ analytics.reset()
442442
{% endcodeexampletab %}
443443
{% endcodeexample %}
444444

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:
458-
459-
1. Download and install the dependency.
460-
```java
461-
implementation 'com.segment.analytics.kotlin:destination-filters-kotlin:0.1.0'
462-
```
463-
464-
2. Add the plugin.
465-
```java
466-
analytics.add(DestinationFilters())
467-
```
468-
469445
## Build Your own destination
470446

471447
If Segment doesn't support your Kotlin destination, you can build your own with the template Segment provides.

src/connections/sources/catalog/libraries/mobile/react-native/index.md

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -491,45 +491,6 @@ These are the example plugins you can use and alter to meet your tracking needs:
491491
| Firebase | `@segment/analytics-react-native-plugin-consent-firebase` |
492492
| IDFA | `@segment/analytics-react-native-plugin-idfa` |
493493
494-
## Destination Filters
495-
> info ""
496-
> 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.
509-
* Using NPM:
510-
```npm
511-
npm install --save @segment/analytics-react-native-plugin-destination-filters
512-
```
513-
* Using Yarn:
514-
```yarn
515-
yarn add @segment/analytics-react-native-plugin-destination-filters
516-
```
517-
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.
519-
520-
```kotlin
521-
import { createClient } from '@segment/analytics-react-native';
522-
523-
import { DestinationFiltersPlugin } from '@segment/analytics-react-native-plugin-destination-filters';
524-
525-
const segmentClient = createClient({
526-
writeKey: 'SEGMENT_KEY'
527-
});
528-
529-
segmentClient.add({ plugin: new DestinationFiltersPlugin() });
530-
segment.add({ plugin: new FirebasePlugin() })
531-
```
532-
533494
## Supported Destinations
534495
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:
535496
- [Adjust](https://www.npmjs.com/package/@segment/analytics-react-native-plugin-adjust){:target="_blank"}

src/connections/sources/catalog/libraries/mobile/swift-ios/index.md

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If you're migrating to Analytics-Swift from a different mobile library, you can
1313
> Analytics-Swift currently supports [these destinations](#supported-destinations) in device-mode, with more to follow. Cloud-mode destinations are also supported.
1414
1515

16-
## Getting started
16+
## Getting Started
1717
To get started with the Analytics-Swift mobile library:
1818

1919
1. Create a Source in Segment.
@@ -59,10 +59,6 @@ To get started with the Analytics-Swift mobile library:
5959
`trackApplicationLifecycleEvents`| The default is set to `true`. <br> This automatically tracks lifecycle events. Set to `false` to stop tracking lifecycle events.
6060
`trackDeepLinks` | The default is set to `true`. <br> This automatically track deep links. Set to `false` to stop tracking Deep Links.
6161

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-
6662
## Tracking Methods
6763
Once you've installed the Analytics-Swift library, you can start collecting data through Segment's tracking methods:
6864
- [Identify](#identify)
@@ -205,7 +201,7 @@ analytics.alias(newId: "user-123")
205201
{% endcodeexampletab %}
206202
{% endcodeexample %}
207203

208-
## Plugin architecture
204+
## Plugin Architecture
209205
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.
210206

211207
Plugins are run through a timeline, which executes in order of insertion based on their entry types. Segment has these 5 entry types:
@@ -334,7 +330,7 @@ analytics.add(plugin: yourIntegration)
334330

335331
Though you can add plugins anywhere in your code, it's best to implement your plugin when you configure the client.
336332

337-
## Utility methods
333+
## Utility Methods
338334
The Analytics Swift utility methods help you work with [plugins](#plugin-architecture) from the analytics timeline. They include:
339335
- [Add](#add)
340336
- [Find](#find)
@@ -410,30 +406,6 @@ analytics.flush()
410406
{% endcodeexampletab %}
411407
{% endcodeexample %}
412408

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, import the package with `import DestinationFilters_Swift` to reference the Destination Filters plugin.
432-
2. Add the plugin.
433-
```swift
434-
analytics.add(DestinationFilters())
435-
```
436-
437409
## Ad Tracking and IDFA
438410
[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).
439411

@@ -444,13 +416,13 @@ let idfaPlugin = IDFACollection()
444416
analytics.add(plugin: idfaPlugin)
445417
```
446418

447-
## Supported destinations
419+
## Supported Destinations
448420
Segment supports these destinations for Analytics Swift, with more to come:
449-
* [Amplitude](https://github.com/segment-integrations/analytics-swift-amplitude){:target="_blank"}
450-
* [Appsflyer](https://github.com/segment-integrations/analytics-swift-appsflyer){:target="_blank"}
451-
* [Facebook App Events](https://github.com/segment-integrations/analytics-swift-facebook-app-events){:target="_blank"}
452-
* [Firebase](https://github.com/segment-integrations/analytics-swift-firebase){:target="_blank"}
453-
* [Mixpanel](https://github.com/segment-integrations/analytics-swift-mixpanel){:target="_blank"}
421+
* [Amplitude](https://github.com/segment-integrations/analytics-swift-amplitude)
422+
* [Appsflyer](https://github.com/segment-integrations/analytics-swift-appsflyer)
423+
* [Facebook App Events](https://github.com/segment-integrations/analytics-swift-facebook-app-events)
424+
* [Firebase](https://github.com/segment-integrations/analytics-swift-firebase)
425+
* [Mixpanel](https://github.com/segment-integrations/analytics-swift-mixpanel)
454426

455427
## FAQs
456428
### 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
459431
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.
460432

461433
## 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).

src/guides/filtering-data.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,30 +43,20 @@ Note that destination flags are **case sensitive** and match the destination's n
4343

4444
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.
4545

46-
## Destination filters
46+
## Destination Filters
4747

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.
4949

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.
5752
5853
![](images/destination-filter-create.png)
5954

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.
6656

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.
6858

69-
## Per-Source schema integrations filters
59+
## Per-Source Schema Integrations Filters
7060

7161
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.
7262

@@ -78,7 +68,7 @@ The events filtered out of individual destinations using this method still arriv
7868

7969
**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.
8070

81-
## Schema event filters
71+
## Schema Event Filters
8272

8373
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.
8474

0 commit comments

Comments
 (0)