AWS Amplify API
AWS Amplify Home
Options
All

- Public
- Public/Protected
- All

Inherited Externals Only exported
Menu

Provide mobile analytics client functions

### Hierarchy

- AnalyticsClass

## Index

### Constructors

- constructor

### Methods

- addPluggable
- autoTrack
- configure
- disable
- enable
- getModuleName
- getPluggable
- record
- removePluggable
- startSession
- stopSession
- updateEndpoint

## Constructors

### constructor

- new AnalyticsClass(): AnalyticsClass

- - Defined in analytics/src/Analytics.ts:50

  Initialize Analtyics

  #### Returns AnalyticsClass

## Methods

### addPluggable

- addPluggable(pluggable: AnalyticsProvider): any

- - Defined in analytics/src/Analytics.ts:114

  add plugin into Analytics category

  #### Parameters

  - ##### pluggable: AnalyticsProvider

    an instance of the plugin

  #### Returns any

### autoTrack

- autoTrack(trackerType: any, opts: any): void

- - Defined in analytics/src/Analytics.ts:256

  #### Parameters

  - ##### trackerType: any

  - ##### opts: any

  #### Returns void

### configure

- configure(config?: any): any

- - Defined in analytics/src/Analytics.ts:72

  configure Analytics

  #### Parameters

  - ##### Optional config: any

    Configuration of the Analytics

  #### Returns any

### disable

- disable(): void

- - Defined in analytics/src/Analytics.ts:167

  stop sending events

  #### Returns void

### enable

- enable(): void

- - Defined in analytics/src/Analytics.ts:174

  start sending events

  #### Returns void

### getModuleName

- getModuleName(): string

- - Defined in analytics/src/Analytics.ts:65

  #### Returns string

### getPluggable

- getPluggable(providerName: any): any

- - Defined in analytics/src/Analytics.ts:130

  Get the plugin object

  #### Parameters

  - ##### providerName: any

    the name of the plugin

  #### Returns any

### record

- record(event: string | any, provider?: any, metrics?: EventMetrics): Promise<any>

- - Defined in analytics/src/Analytics.ts:203

  Record one analytic event and send it to Pinpoint

  #### Parameters

  - ##### event: string | any

  - ##### Optional provider: any

  - ##### Optional metrics: EventMetrics

  #### Returns Promise<any>

  - A promise which resolves if buffer doesn't overflow

### removePluggable

- removePluggable(providerName: any): void

- - Defined in analytics/src/Analytics.ts:146

  Remove the plugin object

  #### Parameters

  - ##### providerName: any

    the name of the plugin

  #### Returns void

### startSession

- startSession(provider?: string): Promise<any>

- - Defined in analytics/src/Analytics.ts:182

  Record Session start

  #### Parameters

  - ##### Optional provider: string

  #### Returns Promise<any>

  - A promise which resolves if buffer doesn't overflow

### stopSession

- stopSession(provider?: string): Promise<any>

- - Defined in analytics/src/Analytics.ts:191

  Record Session stop

  #### Parameters

  - ##### Optional provider: string

  #### Returns Promise<any>

  - A promise which resolves if buffer doesn't overflow

### updateEndpoint

- updateEndpoint(attrs: any, provider?: any): Promise<any>

- - Defined in analytics/src/Analytics.ts:227

  #### Parameters

  - ##### attrs: any

  - ##### Optional provider: any

  #### Returns Promise<any>