Skip to content

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

fix(analytics): honor opt-out for attribution fetch + email alias (#4881)

Chirag Singhalfce69ab331f6
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs b/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs
index 8113a682e..5715dc0dc 100755
--- a/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs
@@ -515,6 +515,14 @@ pub fn start_analytics(
tokio::spawn({
let analytics_manager = analytics_manager.clone();
async move {
+ // Respect the user's telemetry opt-out for network beacons too. The
+ // `send_event` path already gates on `enabled`, but `fetch_attribution`
+ // and `send_alias` used to fire an outbound request to
+ // screenpipe.com regardless — so an opt-out user still leaked their
+ // IP + install-launch timing to the website every boot.
+ if !should_enable_analytics {
+ return;
+ }
// Try to fetch UTM attribution from website (IP-matched, 2hr window)
// This must happen before app_started so the first event carries attribution
analytics_manager.fetch_attribution().await;