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
{{ message }}
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+27-18Lines changed: 27 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Analytics helps you measure your users, product, and business. It unlocks insigh
20
20
3.**Explore your data** by creating metrics (for example, new signups, retention cohorts, and revenue generation).
21
21
- The best Segment companies use retention cohorts to measure product market fit. Netflix has 70% paid retention after 12 months, 30% after 7 years.
22
22
23
-
[Segment](https://segment.com) collects analytics data and allows you to send it to more than 250 apps (such as Google Analytics, Mixpanel, Optimizely, Facebook Ads, Slack, Sentry) just by flipping a switch. You only need one Segment code snippet, and you can turn integrations on and off at will, with no additional code. [Sign up with Segment today](https://app.segment.com/signup).
23
+
[Segment](https://segment.com) collects analytics data and allows you to send it to more than 250 apps (such as Google Analytics, Mixpanel, Optimizely, Facebook Ads, Slack, Sentry) just by flipping a switch. You only need one Segment code snippet, and you can turn destinations on and off from the Segment web UI, with no additional code. [Sign up with Segment today](https://app.segment.com/signup).
24
24
25
25
### Why?
26
26
@@ -54,6 +54,10 @@ If you are part of a new startup (<$5M raised, <2 years since founding),
54
54
55
55
## Prerequisite
56
56
57
+
#### React-Native
58
+
59
+
- Version 0.62 or greater.
60
+
57
61
#### iOS
58
62
59
63
- CocoaPods (**recommended**)
@@ -71,15 +75,17 @@ $ yarn react-native link
71
75
72
76
See the [API docs](packages/core/docs/classes/analytics.client.md) for more details.
73
77
78
+
Additional examples of common usage patterns and how-to's can found at [Analytics for React-Native](https://segment.com/docs/connections/sources/catalog/libraries/mobile/react-native/).
There are two ways to send data to your analytics services through this library:
112
118
113
119
1.[Through the Segment servers](#cloud-based-connection-modes)
114
-
2.[Directly from the device using bundled SDK’s](#packaging-device-based-destination-sdks)
120
+
2.[Directly from the device using bundled SDK’s](#packaging-device-mode-destination-sdks)
115
121
116
122
**Note**: Refer to the specific destination’s docs to see if your tool must be bundled in the app or sent server-side.
117
123
118
124
#### Cloud-based Connection Modes
119
125
120
-
When an destination’s SDK is not packaged, but it is enabled via your dashboard, the request goes through the Segment REST API, and is routed to the service’s server-side API as [described here](https://segment.com/docs/integrations/#connection-modes).
126
+
When an destination’s SDK is not packaged, but it is enabled using the Segment web UI, the request goes through the Segment REST API, and is routed to the service’s server-side API as [described here](https://segment.com/docs/connections/destinations/#connection-modes).
121
127
122
-
#### Packaging Device-based destination SDKs
128
+
#### Packaging Device-mode Destination SDKs
123
129
124
130
By default, our `@segment/analytics-react-native` package does not contain any device-based destinations.
125
131
126
-
We recommend using device-based destinations on a need-to-use basis to reduce the size of your application, and avoid running into the dreaded 65k method limit on Android.
132
+
We recommend only using device-based destinations on a need-to-use basis to reduce the size of your application, and to avoid running into the dreaded 65k method limit on Android.
127
133
128
-
If you would like to package device-based destinations, first search for the dependency you need using [the list below](#integrations).
129
-
You'll need to run `react-native link` and add it in the `.using()` configuration method. Example using Firebase :
134
+
If you would like to package device-based destinations, first search for the dependency you need using [the list below](#supported-device-mode-destinations).
135
+
Then run `react-native link` and add it in the `.using()` configuration method. Example using Firebase :
For IOS you will need to add the GoogleService-info.plist to your IOS folder. This file can be downloaded from your Firebase instance. Firebase takes up to 24 hours to show events. However, you can utilize the Firebase debug method to confirm your setup is sending data correctly. To do this add ```-FIRDebugEnabled``` in Xcode’s Scheme Settings.
For IOS you must add the GoogleService-info.plist to your iOS folder. This file can be downloaded from your Firebase instance. Firebase takes up to 24 hours to show events. However, you can utilize the Firebase debug method to confirm your setup is sending data correctly. To do this add `-FIRDebugEnabled` in Xcode’s Scheme Settings.
> All destinations have the same version as `@segment/analytics-react-native`
152
161
153
-
> All integrations have the same version as `@segment/analytics-react-native`
162
+
**Note**: Each device-mode destination has a different native setup procedure due to differences between the underlying SDK vendors. Please refer to the vendor documentation for configuring the native iOS and Android portions of a given destination. More information and links to vendor specific instructions and details can be found at [Connection Mode Comparisons](https://segment.com/docs/connections/destinations/cmodes-compare/).
154
163
155
164
<!-- AUTOGEN:INTEGRATIONS:BEGIN -->
156
165
@@ -187,7 +196,7 @@ In Xcode:
187
196
188
197
We **highly recommend** using Cocoapods.
189
198
190
-
However, if you cannot use Cocoapods, you can manually install our dynamic framework allowing you to send data to Segment and on to enabled cloud-mode destinations. We do not support sending data to bundled, device-mode integrations outside of Cocoapods.
199
+
However, if you cannot use Cocoapods, you can manually install our dynamic framework allowing you to send data to Segment and on to enabled cloud-mode destinations. We do not support sending data to bundled, device-mode destinations outside of Cocoapods.
191
200
192
201
Here are the steps for installing manually:
193
202
@@ -209,7 +218,7 @@ If you're using Cocoapods, check that your `ios/Podfile` file contains the right
209
218
```ruby
210
219
pod 'RNAnalytics', :path => '../node_modules/@segment/analytics-react-native'
211
220
```
212
-
-`Failed to load [...] integration native module`, look for the integration native module, example with Google Analytics:
221
+
-`Failed to load [...] integration native module`, look for the destination native module, example with Google Analytics:
213
222
```ruby
214
223
pod 'RNAnalyticsIntegration-Google-Analytics', :path => '../node_modules/@segment/analytics-react-native-google-analytics'
215
224
```
@@ -239,7 +248,7 @@ Check that `android/app/src/main/.../MainApplication.java` contains a reference
239
248
}
240
249
```
241
250
242
-
-`Failed to load [...] integration native module`, look for the integration native module, example with Google Analytics:
251
+
-`Failed to load [...] integration native module`, look for the destination native module, example with Google Analytics:
0 commit comments