diff --git a/apps/web-roo-code/.env.example b/apps/web-roo-code/.env.example index 01258bc5005..c5e8726df1e 100644 --- a/apps/web-roo-code/.env.example +++ b/apps/web-roo-code/.env.example @@ -1,7 +1,6 @@ # PostHog Analytics Configuration # Replace these values with your actual PostHog API key and host NEXT_PUBLIC_POSTHOG_KEY=your_posthog_api_key_here -NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com # Basin Form Endpoint for Static Form Submissions # Replace this with your actual Basin form endpoint (e.g., https://usebasin.com/f/your-form-id) diff --git a/apps/web-roo-code/src/components/providers/posthog-provider.tsx b/apps/web-roo-code/src/components/providers/posthog-provider.tsx index 0d8932d549b..29e2fca9334 100644 --- a/apps/web-roo-code/src/components/providers/posthog-provider.tsx +++ b/apps/web-roo-code/src/components/providers/posthog-provider.tsx @@ -32,7 +32,6 @@ export function PostHogProvider({ children }: { children: React.ReactNode }) { // Initialize PostHog immediately on the client side if (typeof window !== "undefined" && !posthog.__loaded) { const posthogKey = process.env.NEXT_PUBLIC_POSTHOG_KEY - const posthogHost = process.env.NEXT_PUBLIC_POSTHOG_HOST // Check if environment variables are set if (!posthogKey) { @@ -43,19 +42,13 @@ export function PostHogProvider({ children }: { children: React.ReactNode }) { return } - if (!posthogHost) { - console.warn( - "PostHog host URL is missing. Using default host. " + - "Please set NEXT_PUBLIC_POSTHOG_HOST in your .env file.", - ) - } - // Check if user has already consented to cookies const userHasConsented = hasConsent() // Initialize PostHog with appropriate persistence based on consent posthog.init(posthogKey, { - api_host: posthogHost || "https://us.i.posthog.com", + api_host: "https://ph.roocode.com", + ui_host: "https://us.posthog.com", capture_pageview: false, // We handle pageview tracking manually loaded: (posthogInstance) => { if (process.env.NODE_ENV === "development") { diff --git a/packages/telemetry/src/PostHogTelemetryClient.ts b/packages/telemetry/src/PostHogTelemetryClient.ts index f1c46577df5..d7f632f1379 100644 --- a/packages/telemetry/src/PostHogTelemetryClient.ts +++ b/packages/telemetry/src/PostHogTelemetryClient.ts @@ -25,7 +25,7 @@ export class PostHogTelemetryClient extends BaseTelemetryClient { debug, ) - this.client = new PostHog(process.env.POSTHOG_API_KEY || "", { host: "https://us.i.posthog.com" }) + this.client = new PostHog(process.env.POSTHOG_API_KEY || "", { host: "https://ph.roocode.com" }) } /** diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index c91e2e78113..ff97d5f030a 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -1196,7 +1196,7 @@ export class ClineProvider - +