Skip to content

Commit 5cfb559

Browse files
authored
Merge pull request #6036 from segmentio/niall/rn_anon_identify
Add anonymous identify method info
2 parents b99625d + b7ff57f commit 5cfb559

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+
To send updates for anonymous users who haven't yet signed up for your app, pass `null` for the `userId` like in 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)