Skip to content

Commit db85460

Browse files
author
Niall Brennan
committed
add anonymous identify method info
1 parent b99625d commit db85460

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Once you've installed the Analytics React Native library, you can start collecti
1414

1515
The [Identify](/docs/connections/spec/identify/) method lets you tie a user to their actions and record traits about them. This includes a unique user ID and any optional traits you know about them like their email, name, or address. The traits option can include any information you want to tie to the user. When using any of the [reserved user traits](/docs/connections/spec/identify/#traits), be sure the information reflects the name of the trait. For example, `email` should always be a string of the user's email address.
1616

17+
You may wish to send updates for anonymous users who have not yet signed up for your app, to do this pass `null` for the userId. Please see the example below.
18+
1719
{% codeexample %}
1820
{% codeexampletab Method signature %}
1921
```js
@@ -30,6 +32,13 @@ identify('user-123', {
3032
3133
plan: 'premium',
3234
});
35+
36+
//To send traits for an anonymous user
37+
identify(null, {
38+
username: 'MisterWhiskers',
39+
40+
plan: 'premium',
41+
});
3342
```
3443
{% endcodeexampletab %}
3544
{% endcodeexample %}

0 commit comments

Comments
 (0)