diff --git a/src/index.ts b/src/index.ts index f13faf1ec..d0c8050c5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,6 +18,7 @@ import { injectServerAuthIntoClient, log, logLegacyPluginStartupWarning } from " import { detectExternalSkillPlugin, getSkillPluginConflictWarning } from "./shared/external-plugin-detector" import { startBackgroundCheck as startTmuxCheck } from "./tools/interactive-bash" import { lspManager } from "./tools/lsp/client" +import { createPluginPostHog, getPostHogDistinctId } from "./shared/posthog" let activePluginDispose: PluginDispose | null = null @@ -37,6 +38,16 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => { await activePluginDispose?.() const pluginConfig = loadPluginConfig(ctx.directory, ctx) + + const posthog = createPluginPostHog() + posthog.capture({ + distinctId: getPostHogDistinctId(), + event: "plugin_loaded", + properties: { + has_openclaw: !!pluginConfig.openclaw, + tmux_enabled: isTmuxIntegrationEnabled(pluginConfig), + }, + }) if (pluginConfig.openclaw) { await initializeOpenClaw(pluginConfig.openclaw) }