Skip to content

Latest commit

 

History

History
260 lines (156 loc) · 7.89 KB

analytics.client.md

File metadata and controls

260 lines (156 loc) · 7.89 KB

@metarouter/analytics-react-native > Client

Class: Client

Hierarchy

Client

Index

Properties

Methods


Properties

ready

● ready: false = false

Defined in analytics.ts:96


Methods

alias

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

catch(handler: ErrorHandler): this

Defined in analytics.ts:111

Parameters:

Name Type
handler ErrorHandler

Returns: this


disable

disable(): Promise<void>

Defined in analytics.ts:305

Returns: Promise<void>


enable

enable(): Promise<void>

Defined in analytics.ts:295

Returns: Promise<void>


flush

flush(): Promise<void>

Defined in analytics.ts:286

Returns: Promise<void>


getAnonymousId

getAnonymousId(): Promise<string>

Defined in analytics.ts:310

Returns: Promise<string>


group

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

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: Middleware): this

Defined in analytics.ts:149

Parameters:

Name Type Description
middleware Middleware

Returns: this


reset

reset(): Promise<void>

Defined in analytics.ts:276

Returns: Promise<void>


screen

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

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

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

useNativeConfiguration(): this

Defined in analytics.ts:161

Returns: this