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
@@ -22,7 +26,7 @@ If you’re using `analytics-react-native 1.5.1` or older, follow these steps to
22
26
23
27
4. Initialize and configure the Analytics React Native 2.0client. Thepackage exposes a method called `createClient` which you can use to create the Segment Analytics client. This central client manages all the tracking events.
24
28
```js
25
-
import { createClient } from '@segment/analytics-react-native';
29
+
import { createClient, AnalyticsProvider } from '@segment/analytics-react-native';
26
30
27
31
const segmentClient = createClient({
28
32
writeKey: 'SEGMENT_API_KEY'
@@ -82,7 +86,7 @@ PODS:
82
86
{% endcodeexampletab %}
83
87
{% endcodeexample %}
84
88
85
-
### Example client configuration for`analytics-react-native 2.0.0`
89
+
### Example client configuration for`analytics-react-native 2.2.0`
86
90
87
91
{% codeexample %}
88
92
{% codeexampletab App.tsx (or .js) %}
@@ -92,13 +96,16 @@ import {
92
96
AnalyticsProvider,
93
97
} from '@segment/analytics-react-native';
94
98
99
+
import { FirebasePlugin } from '@segment/analytics-react-native-plugin-firebase';
95
100
...
96
101
97
102
const segmentClient = createClient({
98
103
writeKey: 'WRITE_KEY',
99
104
trackAppLifecycleEvents: true,
100
105
});
101
106
107
+
segmentClient.add({ plugin: new FirebasePlugin() });
0 commit comments