@univerjs-protelemetryclassesPosthogtelemetryservice

@univerjs-pro/telemetry v0.5.4


Class: PosthogTelemetryService

Defined in: packages/telemetry/src/services/posthog.ts:11

Univer telemetry service interface. You should implement this interface to track telemetry data.

Extends

Implements

Constructors

new PosthogTelemetryService()

new PosthogTelemetryService(): PosthogTelemetryService

Defined in: packages/telemetry/src/services/posthog.ts:15

Returns

PosthogTelemetryService

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
_posthogprotectedundefined | PostHogundefined-packages/telemetry/src/services/posthog.ts:13

Accessors

posthog

Get Signature

get posthog(): undefined | PostHog

Defined in: packages/telemetry/src/services/posthog.ts:21

Returns

undefined | PostHog

Methods

capture()

capture(eventName, params?): void

Defined in: packages/telemetry/src/services/posthog.ts:89

Track the event.

Parameters

ParameterType
eventNamestring
params?Record<string, any>

Returns

void

Implementation of

ITelemetryService.capture


debug()

debug(): void

Defined in: packages/telemetry/src/services/posthog.ts:41

Enable the debug mode.

Returns

void

Implementation of

ITelemetryService.debug


dispose()

dispose(): void

Defined in: packages/telemetry/src/services/posthog.ts:99

Returns

void

Implementation of

IDisposable.dispose

Overrides

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


endTime()

endTime(functionName): void

Defined in: packages/telemetry/src/services/posthog.ts:64

End the timer.

Parameters

ParameterType
functionNamestring

Returns

void

Implementation of

ITelemetryService.endTime


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


identify()

identify(id, params?): void

Defined in: packages/telemetry/src/services/posthog.ts:85

Identify the user.

Parameters

ParameterType
idstring
params?Record<string, any>

Returns

void

Implementation of

ITelemetryService.identify


init()

init(options?): void

Defined in: packages/telemetry/src/services/posthog.ts:45

Initialize the telemetry service.

Parameters

ParameterType
options?Record<string, any>

Returns

void

Implementation of

ITelemetryService.init


onPageView()

onPageView(url): void

Defined in: packages/telemetry/src/services/posthog.ts:93

Track the page view.

Parameters

ParameterType
urlstring

Returns

void

Implementation of

ITelemetryService.onPageView


reset()

reset(): void

Defined in: packages/telemetry/src/services/posthog.ts:56

Reset the user.

Returns

void

Implementation of

ITelemetryService.reset


startTime()

startTime(functionName): void

Defined in: packages/telemetry/src/services/posthog.ts:60

Start the timer.

Parameters

ParameterType
functionNamestring

Returns

void

Implementation of

ITelemetryService.startTime


trackPerformance()

trackPerformance(params): void

Defined in: packages/telemetry/src/services/posthog.ts:77

Track the performance event.

Parameters

ParameterType
params{ [prop: string]: any; duration: number; functionName: string; }
params.durationnumber
params.functionNamestring

Returns

void

Implementation of

ITelemetryService.trackPerformance