Add analytics tracking to MCP, skills, plugins, and checkout

Track modal opens, installs, removals with properties for MCP
servers, skills, and plugins. Add checkout completed event and
support attempted event. Include error details in install failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
andrepimenta
2026-04-12 22:37:41 +01:00
parent e31c5357d2
commit 6d112012b2
3 changed files with 13 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ const getPluginsScript = () => `
}
function showPluginsModal() {
sendStats('Plugins modal opened');
document.getElementById('pluginsModal').style.display = 'flex';
loadInstalledPlugins();
renderAvailablePlugins(topPlugins);
@@ -138,11 +139,13 @@ const getPluginsScript = () => `
}
function installPlugin(installId) {
sendStats('Plugin installed', { plugin: installId });
vscode.postMessage({ type: 'installPlugin', installId: installId });
hidePluginsModal();
}
function removePlugin(installId) {
sendStats('Plugin removed', { plugin: installId });
vscode.postMessage({ type: 'removePlugin', installId: installId });
}
`;