Skip to content

Commit 376c8f1

Browse files
committed
Track clicks
1 parent ef580f9 commit 376c8f1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/types/src/telemetry.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ export enum TelemetryEventName {
6161
ACCOUNT_LOGOUT_CLICKED = "Account Logout Clicked",
6262
ACCOUNT_LOGOUT_SUCCESS = "Account Logout Success",
6363

64+
FEATURED_PROVIDER_CLICKED = "Featured Provider Clicked",
65+
6466
SCHEMA_VALIDATION_ERROR = "Schema Validation Error",
6567
DIFF_APPLICATION_ERROR = "Diff Application Error",
6668
SHELL_INTEGRATION_ERROR = "Shell Integration Error",
@@ -181,6 +183,7 @@ export const rooCodeTelemetryEventSchema = z.discriminatedUnion("type", [
181183
TelemetryEventName.ACCOUNT_CONNECT_SUCCESS,
182184
TelemetryEventName.ACCOUNT_LOGOUT_CLICKED,
183185
TelemetryEventName.ACCOUNT_LOGOUT_SUCCESS,
186+
TelemetryEventName.FEATURED_PROVIDER_CLICKED,
184187
TelemetryEventName.SCHEMA_VALIDATION_ERROR,
185188
TelemetryEventName.DIFF_APPLICATION_ERROR,
186189
TelemetryEventName.SHELL_INTEGRATION_ERROR,

webview-ui/src/components/welcome/WelcomeView.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
55
import posthog from "posthog-js"
66

77
import type { ProviderSettings } from "@roo-code/types"
8+
import { TelemetryEventName } from "@roo-code/types"
89

910
import { useExtensionState } from "@src/context/ExtensionStateContext"
1011
import { validateApiConfiguration } from "@src/utils/validate"
1112
import { vscode } from "@src/utils/vscode"
1213
import { useAppTranslation } from "@src/i18n/TranslationContext"
1314
import { getRequestyAuthUrl, getOpenRouterAuthUrl } from "@src/oauth/urls"
15+
import { telemetryClient } from "@src/utils/TelemetryClient"
1416

1517
import ApiOptions from "../settings/ApiOptions"
1618
import { Tab, TabContent } from "../common/Tab"
@@ -121,6 +123,11 @@ const WelcomeView = () => {
121123
target="_blank"
122124
rel="noopener noreferrer"
123125
onClick={(e) => {
126+
// Track telemetry for featured provider click
127+
telemetryClient.capture(TelemetryEventName.FEATURED_PROVIDER_CLICKED, {
128+
provider: provider.slug,
129+
})
130+
124131
// Special handling for Roo provider
125132
if (provider.slug === "roo") {
126133
e.preventDefault()

0 commit comments

Comments
 (0)