Add editor name tag to Umami analytics

Pass vscode.env.appName (VS Code, Cursor, etc.) as data-tag
on the Umami script to segment analytics by editor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
andrepimenta
2026-04-12 14:55:34 +01:00
parent f5d4c7851b
commit 05a15d19a6
4 changed files with 5 additions and 5 deletions

View File

@@ -6,7 +6,7 @@
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERSION="1.1.0"
VERSION="2.0.1"
OUTPUT_NAME="vsix-claude-code-chat-${VERSION}.vsix"
echo "Building Open VSIX version ${VERSION}..."

View File

@@ -2,7 +2,7 @@
"name": "claude-code-chat",
"displayName": "Chat for Claude Code",
"description": "Beautiful Claude Code Chat Interface for VS Code",
"version": "2.0.0",
"version": "2.0.1",
"publisher": "AndrePimenta",
"author": "Andre Pimenta",
"repository": {

View File

@@ -3327,7 +3327,7 @@ class ClaudeChatProvider {
}
private _getHtmlForWebview(): string {
return getHtml(vscode.env?.isTelemetryEnabled, OPENCREDITS_API_URL, OPENCREDITS_WEB_URL, OPENCREDITS_PUBLISHABLE_KEY);
return getHtml(vscode.env?.isTelemetryEnabled, OPENCREDITS_API_URL, OPENCREDITS_WEB_URL, OPENCREDITS_PUBLISHABLE_KEY, vscode.env?.appName);
}
private _sendCurrentSettings(): void {

View File

@@ -8,7 +8,7 @@ import getSkillsHtml from './skills-ui'
import getPluginsHtml from './plugins-ui'
const getHtml = (isTelemetryEnabled: boolean, opencreditsApiUrl: string = 'https://ccc.api.opencredits.ai', opencreditsWebUrl: string = 'https://ccc.opencredits.ai', opencreditsPublishableKey: string = 'oc_pk_c43da4f9a9484ae484ad29bc97cc354f') => `<!DOCTYPE html>
const getHtml = (isTelemetryEnabled: boolean, opencreditsApiUrl: string = 'https://ccc.api.opencredits.ai', opencreditsWebUrl: string = 'https://ccc.opencredits.ai', opencreditsPublishableKey: string = 'oc_pk_c43da4f9a9484ae484ad29bc97cc354f', editorName: string = 'unknown') => `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
@@ -1076,7 +1076,7 @@ const getHtml = (isTelemetryEnabled: boolean, opencreditsApiUrl: string = 'https
2. Do I need to display a cookie notice to users?
No, Umami does not use any cookies in the tracking code.
-->
${isTelemetryEnabled ? '<script defer src="https://umami.claudecodechat.com/script.js" data-website-id="0159e9b1-4a98-4b49-943a-32db3e743b95"></script>' : '<!-- Umami analytics disabled due to VS Code telemetry settings -->'}
${isTelemetryEnabled ? '<script defer src="https://product.opencredits.ai/script.js" data-website-id="0159e9b1-4a98-4b49-943a-32db3e743b95" data-tag="' + editorName + '"></script>' : '<!-- Analytics disabled due to VS Code telemetry settings -->'}
</body>
</html>`;