Skip to main content

Module PostHogPlugin

Module PostHogPlugin 

Source
Expand description

ยงPostHog Plugin Module

Debug-only PostHog analytics integration for Mountain. Captures lifecycle events, IPC commands, errors, and performance metrics. Disabled in release builds (compile-time gated).

Constantsยง

POSTHOG_API_KEY ๐Ÿ”’
PostHog EU Cloud project token (debug builds only).
POSTHOG_HOST ๐Ÿ”’
PostHog EU Cloud host.

Staticsยง

CLIENT ๐Ÿ”’
Global PostHog client instance.

Functionsยง

CaptureError
Capture an error event.
CaptureEvent
Capture a named event with optional properties.
CaptureIPC
Capture an IPC command invocation.
DistinctId ๐Ÿ”’
Machine-stable distinct ID for the dev session.
Initialize
Initialize the PostHog client. Call once during app setup. No-op in release builds.