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
-[Report errors from plugins](#report-errors-from-plugins)
205
-
-[Native AnonymousId](#native-anonymousid)
205
+
-[Native anonymousId](#native-anonymousid)
206
+
-[Retrieving the anonymousId](#retrieving-anonymousid)
206
207
-[Configure iOS deep link tracking](#configure-ios-deep-link-tracking)
207
208
-[Device identifiers](#device-identifiers)
208
209
@@ -445,6 +446,15 @@ private AnalyticsReactNativePackage analytics = new AnalyticsReactNativePackage(
445
446
analytics.setAnonymousId("My-New-Native-Id");
446
447
}
447
448
```
449
+
### Retrieving the anonymousId
450
+
The React Native library does not have a specific method for retrieving the anonymousId. However, you can access this value by calling the following in your code:
451
+
452
+
```js
453
+
segmentClient.userInfo.get().anonymousId
454
+
```
455
+
456
+
Retrieving the anonymousId can be useful if you need to pass this value to your backend, or if you're using a web view component with Segment's Analytics.js library and need to link user activity.
457
+
448
458
### Configure iOS deep link tracking
449
459
> warning ""
450
460
> This is only required for iOS if you're using the `trackDeepLinks` option. Android doesn't require any additional setup.
0 commit comments