@metarouter/analytics-react-native > Client
Client
- alias
- catch
- disable
- enable
- flush
- getAnonymousId
- group
- identify
- middleware
- reset
- screen
- setup
- track
- useNativeConfiguration
● ready: false
= false
Defined in analytics.ts:96
▸ alias(newId: string
, options?: Options): Promise
<void
>
Defined in analytics.ts:266
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
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. |
Default value options |
Options | {} |
Returns: Promise
<void
>
▸ catch(handler: ErrorHandler): this
Defined in analytics.ts:111
Parameters:
Name | Type |
---|---|
handler | ErrorHandler |
Returns: this
▸ disable(): Promise
<void
>
Defined in analytics.ts:305
Returns: Promise
<void
>
▸ enable(): Promise
<void
>
Defined in analytics.ts:295
Returns: Promise
<void
>
▸ flush(): Promise
<void
>
Defined in analytics.ts:286
Returns: Promise
<void
>
▸ getAnonymousId(): Promise
<string
>
Defined in analytics.ts:310
Returns: Promise
<string
>
▸ group(groupId: string
, traits?: JsonMap, options?: Options): Promise
<void
>
Defined in analytics.ts:253
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
groupId | string |
- | A database ID for this group. |
Default value traits |
JsonMap | {} | A dictionary of traits you know about the group. Things like: name, employees, etc. |
Default value options |
Options | {} | A dictionary of options, e.g. integrations (thigh analytics integration to forward the event to) |
Returns: Promise
<void
>
▸ identify(user: string
, traits?: JsonMap, options?: Options): Promise
<void
>
Defined in analytics.ts:240
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
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 |
Default value traits |
JsonMap | {} | A dictionary of traits you know about the user. Things like: email, name, plan, etc. |
Default value options |
Options | {} | A dictionary of options, e.g. integrations (thigh analytics integration to forward the event to) |
Returns: Promise
<void
>
▸ middleware(middleware: Middleware): this
Defined in analytics.ts:149
Parameters:
Name | Type | Description |
---|---|---|
middleware | Middleware |
Returns: this
▸ reset(): Promise
<void
>
Defined in analytics.ts:276
Returns: Promise
<void
>
▸ screen(name: string
, properties?: JsonMap, options?: Options): Promise
<void
>
Defined in analytics.ts:225
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
name | string |
- | The title of the screen being viewed. We recommend using human-readable names like 'Photo Feed' or 'Completed Purchase Screen'. |
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. |
Default value options |
Options | {} |
Returns: Promise
<void
>
▸ setup(writeKey: string
, configuration?: Configuration): Promise
<void
>
Defined in analytics.ts:188
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
writeKey | string |
- | Your Segment.io write key |
Default value configuration |
Configuration | {} | An optional Configuration object. |
Returns: Promise
<void
>
▸ track(event: string
, properties?: JsonMap, options?: Options): Promise
<void
>
Defined in analytics.ts:207
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
event | string |
- | The name of the event you're tracking. We recommend using human-readable names like `Played a Song` or `Updated Status`. |
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. |
Default value options |
Options | {} | A dictionary of options, e.g. integrations (thigh analytics integration to forward the event to) |
Returns: Promise
<void
>
▸ useNativeConfiguration(): this
Defined in analytics.ts:161
Returns: this