1.0.10 • Published 4 years ago
capacitor-segment-plugin v1.0.10
Capacitor Segment Plugin
The plugin enables segment analytics tracking for ionic apps
Install
npm install capacitor-segment-plugin
npx cap sync
API
initialize(...)
initialize(args: InitializeArguments) => any
Configures and initializes the segment plugin
Param | Type |
---|---|
args | InitializeArguments |
Returns: any
identify(...)
identify(args: IdentifyArguments) => any
Identify a user.
Param | Type |
---|---|
args | IdentifyArguments |
Returns: any
track(...)
track(args: TrackArguments) => any
Track an event.
Param | Type |
---|---|
args | TrackArguments |
Returns: any
screen(...)
screen(args: ScreenArguments) => any
Trigger screen view.
Param | Type |
---|---|
args | ScreenArguments |
Returns: any
page(...)
page(args: PageArguments) => any
Trigger page view.
Param | Type |
---|---|
args | PageArguments |
Returns: any
group(...)
group(options: GroupArguments) => any
Clear all information about the visitor & reset analytic state.
Param | Type |
---|---|
options | GroupArguments |
Returns: any
alias(...)
alias(options: AliasArguments) => any
Clear all information about the visitor & reset analytic state.
Param | Type |
---|---|
options | AliasArguments |
Returns: any
reset()
reset() => any
clears the SDK’s internal stores for the current user and group.
Returns: any
Interfaces
InitializeArguments
Prop | Type |
---|---|
writeKey | string |
trackLifecycleEvents | boolean |
recordScreenViews | boolean |
IdentifyArguments
Prop | Type |
---|---|
userId | string |
traits | any |
options | any |
TrackArguments
Prop | Type |
---|---|
eventName | string |
properties | any |
options | any |
ScreenArguments
Prop | Type |
---|---|
screenName | string |
category | string |
properties | any |
options | any |
PageArguments
Prop | Type |
---|---|
pageName | string |
category | string |
properties | any |
options | any |
GroupArguments
Prop | Type |
---|---|
userId | string |
groupId | string |
traits | any |
options | any |
AliasArguments
Prop | Type |
---|---|
newId | string |
options | any |