@felix-health/capacitor-segment
v4.0.0
Published
Capacitor plugin for Segment analytics
Readme
capacitor-segment
Originally forked from: https://github.com/joinflux/capacitor-segment
A Capacitor plugin for Segment analytics
Install
npm install @felix-health/capacitor-segment
and
npx cap syncAPI
initialize(...)
initialize(options: InitializeOptions) => any| Param | Type |
| ------------- | ------------------------------------------------------------------------------------ |
| options | { key: string; trackLifecycle?: boolean; recordScreenViews?: boolean; } |
Returns: any
identify(...)
identify(options: IdentifyOptions) => any| Param | Type |
| ------------- | -------------------------------------------------------- |
| options | Identity & { traits?: any; options?: any; } |
Returns: any
track(...)
track(options: TrackOptions) => any| Param | Type |
| ------------- | ---------------------------------------------------- |
| options | { eventName: string; properties: any; } |
Returns: any
page(...)
page(options: PageOptions) => any| Param | Type |
| ------------- | ---------------------------------- |
| options | { pathname: string; } |
Returns: any
reset()
reset() => anyReturns: any
How to publish
- Test your changes
- Update the version in
package.json, you can usenpm version patch|minor|major. - Run
npm run buildto build the plugin. - Run
npm publish --access publicto publish the plugin to npm.
License
MIT License
