capacitor3-amplitude
v0.0.1
Published
capacitor3 amplitude plugin
Downloads
1
Readme
capacitor3-amplitude
capacitor3 amplitude plugin
Install
npm install capacitor3-amplitude
npx cap sync
API
initialize(...)
logEvent(...)
logEventWithProperties(...)
enableCoppaControl(...)
disableCoppaControl(...)
regenerateDeviceId(...)
setDeviceId(...)
getDeviceId(...)
setOptOut(...)
setLibraryName(...)
setLibraryVersion(...)
trackingSessionEvents(...)
setUseDynamicConfig(...)
setUserId(...)
setServerUrl(...)
logRevenueV2(...)
identify(...)
setGroup(...)
groupIdentify(...)
setUserProperties(...)
clearUserProperties(...)
uploadEvents(...)
getSessionId(...)
setMinTimeBetweenSessionsMillis(...)
setServerZone(...)
setEventUploadMaxBatchSize(...)
setEventUploadPeriodMillis(...)
setEventUploadThreshold(...)
- Type Aliases
initialize(...)
initialize(options: { instanceName: string; apiKey: string; }) => Promise<void>
| Param | Type |
| ------------- | ------------------------------------------------------ |
| options
| { instanceName: string; apiKey: string; } |
logEvent(...)
logEvent(options: { instanceName: string; eventType: string; }) => Promise<void>
| Param | Type |
| ------------- | --------------------------------------------------------- |
| options
| { instanceName: string; eventType: string; } |
logEventWithProperties(...)
logEventWithProperties(options: { instanceName: string; eventType: string; eventProperties: PropertiesObject; }) => Promise<void>
| Param | Type |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| options
| { instanceName: string; eventType: string; eventProperties: PropertiesObject; } |
enableCoppaControl(...)
enableCoppaControl(options: { instanceName: string; }) => Promise<void>
| Param | Type |
| ------------- | -------------------------------------- |
| options
| { instanceName: string; } |
disableCoppaControl(...)
disableCoppaControl(options: { instanceName: string; }) => Promise<void>
| Param | Type |
| ------------- | -------------------------------------- |
| options
| { instanceName: string; } |
regenerateDeviceId(...)
regenerateDeviceId(options: { instanceName: string; }) => Promise<void>
| Param | Type |
| ------------- | -------------------------------------- |
| options
| { instanceName: string; } |
setDeviceId(...)
setDeviceId(options: { instanceName: string; deviceId: string; }) => Promise<void>
| Param | Type |
| ------------- | -------------------------------------------------------- |
| options
| { instanceName: string; deviceId: string; } |
getDeviceId(...)
getDeviceId(options: { instanceName: string; }) => Promise<string>
| Param | Type |
| ------------- | -------------------------------------- |
| options
| { instanceName: string; } |
Returns: Promise<string>
setOptOut(...)
setOptOut(options: { instanceName: string; optOut: boolean; }) => Promise<void>
| Param | Type |
| ------------- | ------------------------------------------------------- |
| options
| { instanceName: string; optOut: boolean; } |
setLibraryName(...)
setLibraryName(options: { instanceName: string; libraryName: string; }) => Promise<void>
| Param | Type |
| ------------- | ----------------------------------------------------------- |
| options
| { instanceName: string; libraryName: string; } |
setLibraryVersion(...)
setLibraryVersion(options: { instanceName: string; libraryVersion: string; }) => Promise<void>
| Param | Type |
| ------------- | -------------------------------------------------------------- |
| options
| { instanceName: string; libraryVersion: string; } |
trackingSessionEvents(...)
trackingSessionEvents(options: { instanceName: string; trackingSessionEvents: boolean; }) => Promise<void>
| Param | Type |
| ------------- | ---------------------------------------------------------------------- |
| options
| { instanceName: string; trackingSessionEvents: boolean; } |
setUseDynamicConfig(...)
setUseDynamicConfig(options: { instanceName: string; useDynamicConfig: boolean; }) => Promise<void>
| Param | Type |
| ------------- | ----------------------------------------------------------------- |
| options
| { instanceName: string; useDynamicConfig: boolean; } |
setUserId(...)
setUserId(options: { instanceName: string; userId: string | null; }) => Promise<void>
| Param | Type |
| ------------- | -------------------------------------------------------------- |
| options
| { instanceName: string; userId: string | null; } |
setServerUrl(...)
setServerUrl(options: { instanceName: string; serverUrl: string; }) => Promise<void>
| Param | Type |
| ------------- | --------------------------------------------------------- |
| options
| { instanceName: string; serverUrl: string; } |
logRevenueV2(...)
logRevenueV2(options: { instanceName: string; userProperties: RevenueProperties; }) => Promise<void>
| Param | Type |
| ------------- | ---------------------------------------------------------------------------------------------------------- |
| options
| { instanceName: string; userProperties: RevenueProperties; } |
identify(...)
identify(options: { instanceName: string; userProperties: PropertiesObject; }) => Promise<void>
| Param | Type |
| ------------- | -------------------------------------------------------------------------------------------------------- |
| options
| { instanceName: string; userProperties: PropertiesObject; } |
setGroup(...)
setGroup(options: { instanceName: string; groupType: string; groupName: string | string[]; }) => Promise<void>
| Param | Type |
| ------------- | ---------------------------------------------------------------------------------------- |
| options
| { instanceName: string; groupType: string; groupName: string | string[]; } |
groupIdentify(...)
groupIdentify(options: { instanceName: string; groupType: string; groupName: string | string[]; userProperties: PropertiesObject; }) => Promise<void>
| Param | Type |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options
| { instanceName: string; groupType: string; groupName: string | string[]; userProperties: PropertiesObject; } |
setUserProperties(...)
setUserProperties(options: { instanceName: string; userProperties: PropertiesObject; }) => Promise<void>
| Param | Type |
| ------------- | -------------------------------------------------------------------------------------------------------- |
| options
| { instanceName: string; userProperties: PropertiesObject; } |
clearUserProperties(...)
clearUserProperties(options: { instanceName: string; }) => Promise<void>
| Param | Type |
| ------------- | -------------------------------------- |
| options
| { instanceName: string; } |
uploadEvents(...)
uploadEvents(options: { instanceName: string; }) => Promise<void>
| Param | Type |
| ------------- | -------------------------------------- |
| options
| { instanceName: string; } |
getSessionId(...)
getSessionId(options: { instanceName: string; }) => Promise<number>
| Param | Type |
| ------------- | -------------------------------------- |
| options
| { instanceName: string; } |
Returns: Promise<number>
setMinTimeBetweenSessionsMillis(...)
setMinTimeBetweenSessionsMillis(options: { instanceName: string; minTimeBetweenSessionsMillis: number; }) => Promise<void>
| Param | Type |
| ------------- | ---------------------------------------------------------------------------- |
| options
| { instanceName: string; minTimeBetweenSessionsMillis: number; } |
setServerZone(...)
setServerZone(options: { instanceName: string; serverZone: string; updateServerUrl: boolean; }) => Promise<void>
| Param | Type |
| ------------- | ------------------------------------------------------------------------------------ |
| options
| { instanceName: string; serverZone: string; updateServerUrl: boolean; } |
setEventUploadMaxBatchSize(...)
setEventUploadMaxBatchSize(options: { instanceName: string; eventUploadMaxBatchSize: number; }) => Promise<void>
| Param | Type |
| ------------- | ----------------------------------------------------------------------- |
| options
| { instanceName: string; eventUploadMaxBatchSize: number; } |
setEventUploadPeriodMillis(...)
setEventUploadPeriodMillis(options: { instanceName: string; eventUploadPeriodMillis: number; }) => Promise<void>
| Param | Type |
| ------------- | ----------------------------------------------------------------------- |
| options
| { instanceName: string; eventUploadPeriodMillis: number; } |
setEventUploadThreshold(...)
setEventUploadThreshold(options: { instanceName: string; eventUploadThreshold: number; }) => Promise<void>
| Param | Type |
| ------------- | -------------------------------------------------------------------- |
| options
| { instanceName: string; eventUploadThreshold: number; } |
Type Aliases
PropertiesObject
Record<string, any>
Record
Construct a type with a set of properties K of type T
{ [P in K]: T; }
RevenueProperties
{ price: number; productId?: string; quantity?: number; revenueType?: string; receipt?: string; receiptSignature?: string; eventProperties?: PropertiesObject; }