YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
feat: track app_version in PostHog (identify + events)
Louis Beaumont399847978742
diff --git a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsxindex 6f9569b0a..ca057e6e8 100644--- a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx+++ b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx@@ -1,4 +1,5 @@import { homeDir } from "@tauri-apps/api/path";+import { getVersion } from "@tauri-apps/api/app";import { platform } from "@tauri-apps/plugin-os";import { Store } from "@tauri-apps/plugin-store";import React, { createContext, useContext, useEffect, useState } from "react";@@ -433,14 +434,28 @@ export const SettingsProvider: React.FC<{ children: React.ReactNode }> = ({ chil// Identify with persistent analyticsId for consistent tracking across frontend/backenduseEffect(() => {if (settings.analyticsId) {- posthog.identify(settings.analyticsId, {- email: settings.user?.email,- name: settings.user?.name,- user_id: settings.user?.id,- github_username: settings.user?.github_username,- website: settings.user?.website,- contact: settings.user?.contact,- });+ getVersion()+ .then((appVersion) => {+ posthog.identify(settings.analyticsId, {+ email: settings.user?.email,+ name: settings.user?.name,+ user_id: settings.user?.id,+ github_username: settings.user?.github_username,+ website: settings.user?.website,+ contact: settings.user?.contact,+ app_version: appVersion,+ });+ })+ .catch(() => {+ posthog.identify(settings.analyticsId, {+ email: settings.user?.email,+ name: settings.user?.name,+ user_id: settings.user?.id,+ github_username: settings.user?.github_username,+ website: settings.user?.website,+ contact: settings.user?.contact,+ });+ });}}, [settings.analyticsId, settings.user?.id]);diff --git a/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs b/apps/screenpipe-app-tauri/src-tauri/src/analytics.rsindex 2863b51d2..bb15ad9d0 100755--- a/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs@@ -56,6 +56,8 @@ impl AnalyticsManager {let posthog_url = format!("{}/capture/", self.api_host);let system = System::new_all();+ let app_version = env!("CARGO_PKG_VERSION");+let mut payload = json!({"api_key": self.posthog_api_key,"event": event,@@ -69,6 +71,7 @@ impl AnalyticsManager {"host_name": system.host_name().unwrap_or_default(),"cpu_count": system.cpus().len(),"total_memory": system.total_memory(),+ "app_version": app_version,},});