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
Copy file name to clipboardExpand all lines: packages/core/docs/classes/analytics.client.md
+31-31Lines changed: 31 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@
38
38
39
39
**● ready**: *`false`* = false
40
40
41
-
*Defined in [analytics.ts:96](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L96)*
41
+
*Defined in analytics.ts:96*
42
42
43
43
Whether the client is ready to send events to Segment.
44
44
@@ -54,15 +54,15 @@ ___
54
54
55
55
▸ **alias**(newId: *`string`*): `Promise`<`void`>
56
56
57
-
*Defined in [analytics.ts:260](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L260)*
57
+
*Defined in analytics.ts:260*
58
58
59
59
Merge two user identities, effectively connecting two sets of user data as one. This may not be supported by all integrations.
60
60
61
61
When you learn more about who the group is, you can record that information with group.
62
62
63
63
**Parameters:**
64
64
65
-
|Param| Type | Description |
65
+
|Name| Type | Description |
66
66
| ------ | ------ | ------ |
67
67
| newId |`string`| The new ID you want to alias the existing ID to. The existing ID will be either the previousId if you have called identify, or the anonymous ID. |
68
68
@@ -75,15 +75,15 @@ ___
75
75
76
76
▸ **catch**(handler: *[ErrorHandler]()*): `this`
77
77
78
-
*Defined in [analytics.ts:109](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L109)*
78
+
*Defined in analytics.ts:109*
79
79
80
80
Catch React-Native bridge errors
81
81
82
82
These errors are emitted when calling the native counterpart.
83
83
84
84
**Parameters:**
85
85
86
-
|Param| Type |
86
+
|Name| Type |
87
87
| ------ | ------ |
88
88
| handler |[ErrorHandler]()|
89
89
@@ -96,7 +96,7 @@ ___
96
96
97
97
▸ **disable**(): `Promise`<`void`>
98
98
99
-
*Defined in [analytics.ts:299](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L299)*
99
+
*Defined in analytics.ts:299*
100
100
101
101
Completely disable the sending of any analytics data.
102
102
@@ -111,7 +111,7 @@ ___
111
111
112
112
▸ **enable**(): `Promise`<`void`>
113
113
114
-
*Defined in [analytics.ts:289](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L289)*
114
+
*Defined in analytics.ts:289*
115
115
116
116
Enable the sending of analytics data. Enabled by default.
117
117
@@ -126,7 +126,7 @@ ___
126
126
127
127
▸ **flush**(): `Promise`<`void`>
128
128
129
-
*Defined in [analytics.ts:280](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L280)*
*Defined in [analytics.ts:235](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L235)*
166
+
*Defined in analytics.ts:235*
167
167
168
168
Associate a user with their unique ID and record traits about them.
169
169
170
170
When you learn more about who your user is, you can record that information with identify.
171
171
172
172
**Parameters:**
173
173
174
-
|Param| Type | Default value | Description |
174
+
|Name| Type | Default value | Description |
175
175
| ------ | ------ | ------ | ------ |
176
176
| user |`string`| - | database ID (or email address) for this user. If you don't have a userId but want to record traits, you should pass nil. For more information on how we generate the UUID and Apple's policies on IDs, see [https://segment.io/libraries/ios#ids](https://segment.io/libraries/ios#ids)|
177
-
|`Default value` traits |`JsonMap`| {} | A dictionary of traits you know about the user. Things like: email, name, plan, etc. |
177
+
|`Default value` traits |[JsonMap]()| {} | A dictionary of traits you know about the user. Things like: email, name, plan, etc. |
*Defined in [analytics.ts:221](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L221)*
241
+
*Defined in analytics.ts:221*
242
242
243
243
Record the screens or views your users see.
244
244
245
245
When a user views a screen in your app, you'll want to record that here. For some tools like Google Analytics and Flurry, screen views are treated specially, and are different from "events" kind of like "page views" on the web. For services that don't treat "screen views" specially, we map "screen" straight to "track" with the same parameters. For example, Mixpanel doesn't treat "screen views" any differently. So a call to "screen" will be tracked as a normal event in Mixpanel, but get sent to Google Analytics and Flurry as a "screen".
246
246
247
247
**Parameters:**
248
248
249
-
|Param| Type | Default value | Description |
249
+
|Name| Type | Default value | Description |
250
250
| ------ | ------ | ------ | ------ |
251
251
| name |`string`| - | The title of the screen being viewed. We recommend using human-readable names like 'Photo Feed' or 'Completed Purchase Screen'. |
252
-
|`Default value` properties |`JsonMap`| {} | A dictionary of properties for the screen view event. If the event was 'Added to Shopping Cart', it might have properties like price, productType, etc. |
252
+
|`Default value` properties |[JsonMap]()| {} | A dictionary of properties for the screen view event. If the event was 'Added to Shopping Cart', it might have properties like price, productType, etc. |
*Defined in [analytics.ts:203](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L203)*
293
+
*Defined in analytics.ts:203*
294
294
295
295
Record the actions your users perform.
296
296
297
297
When a user performs an action in your app, you'll want to track that action for later analysis. Use the event name to say what the user did, and properties to specify any interesting details of the action.
298
298
299
299
**Parameters:**
300
300
301
-
|Param| Type | Default value | Description |
301
+
|Name| Type | Default value | Description |
302
302
| ------ | ------ | ------ | ------ |
303
303
| event |`string`| - | The name of the event you're tracking. We recommend using human-readable names like \`Played a Song\` or \`Updated Status\`. |
304
-
|`Default value` properties |`JsonMap`| {} | A dictionary of properties for the event. If the event was 'Added to Shopping Cart', it might have properties like price, productType, etc. |
304
+
|`Default value` properties |[JsonMap]()| {} | A dictionary of properties for the event. If the event was 'Added to Shopping Cart', it might have properties like price, productType, etc. |
305
305
306
306
**Returns:**`Promise`<`void`>
307
307
@@ -312,7 +312,7 @@ ___
312
312
313
313
▸ **useNativeConfiguration**(): `this`
314
314
315
-
*Defined in [analytics.ts:159](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L159)*
*Defined in [analytics.ts:17](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L17)*
81
+
*Defined in analytics.ts:17*
82
82
83
83
Whether the analytics client should automatically track application lifecycle events, such as "Application Installed", "Application Updated" and "Application Opened".
*Defined in [analytics.ts:26](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L26)*
95
+
*Defined in analytics.ts:26*
96
96
97
97
Whether the analytics client should automatically make a screen call when a view controller is added to a view hierarchy. Because the iOS underlying implementation uses method swizzling, we recommend initializing the analytics client as early as possible.
0 commit comments