Analytics for React Native Destination Filters



Destination filters are in beta and only available to Business Tier customers.

Use Analytics-React-Native to set up destination filters on your mobile device-mode destinations.

You must use Analytics-React-Native version 2.9 or higher to implement destination filters.

Keep these limitations in mind when using destination filters.

To get started with destination filters on mobile device-mode destinations using Analytics-React-Native:

  1. Download and install the @segment/analytics-react-native-plugin-destination-filters package as a dependency in your project.
    • Using NPM:
      npm install --save @segment/analytics-react-native-plugin-destination-filters
      
    • Using Yarn:
      yarn add @segment/analytics-react-native-plugin-destination-filters
      
  2. Follow the instructions for adding plugins on the main Analytics client.
  3. Add DestinationFiltersPlugin after you create your Segment client.
    import { createClient } from '@segment/analytics-react-native';

    import { DestinationFiltersPlugin } from '@segment/analytics-react-native-plugin-destination-filters';

    const segmentClient = createClient({
      writeKey: 'SEGMENT_KEY'
    });

    segmentClient.add({ plugin: new DestinationFiltersPlugin() });
    segment.add({ plugin: new FirebasePlugin() })

This page was last modified: 23 May 2023



Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account