
Threat Research
/Security News
Searchjacked: Hidden Browser Extensions Hijack Searches for 13 Million Users
319 browser extensions installed by 13.4 million users hijack searches, capture queries, and collect referral payments from Yahoo and Bing.
tauri-plugin-telemetry
Advanced tools
Backend-agnostic analytics/telemetry plugin for Tauri v2 apps. Redirect events to any backend.
A backend-agnostic analytics/telemetry plugin for Tauri v2 apps. Send events to
any backend that implements the ingest protocol — point the plugin at your
own backend with InitOptions.host.
Add the Rust crate to src-tauri/Cargo.toml:
[dependencies]
tauri-plugin-telemetry = "0.1.3"
[dependencies]
tauri-plugin-telemetry = { git = "https://github.com/lispking/tauri-plugin-telemetry" }
Install the JavaScript guest bindings with your preferred package manager:
npm add tauri-plugin-telemetry
npm add https://github.com/lispking/tauri-plugin-telemetry
Register the plugin with Tauri:
src-tauri/src/main.rs
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_telemetry::init("APP_KEY"))
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
If you need to point the plugin at your own backend, use Builder::with_host:
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_telemetry::Builder::new("APP_KEY")
.with_host("https://analytics.myapp.com")
.build())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
For full control over all options, use with_options:
use tauri_plugin_telemetry::{Builder, InitOptions};
use std::time::Duration;
fn main() {
let opts = InitOptions {
host: Some("https://analytics.myapp.com".into()),
flush_interval: Some(Duration::from_secs(30)),
api_path: Some("/ingest".into()),
..Default::default()
};
tauri::Builder::default()
.plugin(Builder::new("APP_KEY").with_options(opts).build())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
Then add telemetry:allow-track-event to your Access Control List.
Send events from Rust via the EventTracker trait:
use tauri_plugin_telemetry::{init, EventTracker};
fn main() {
tauri::Builder::default()
.plugin(init("APP_KEY"))
.setup(|app| {
app.track_event("app_started", None);
Ok(())
})
.build(tauri::generate_context!())
.expect("error while running tauri application")
.run(|handler, event| match event {
tauri::RunEvent::Exit { .. } => {
handler.track_event("app_exited", None);
handler.flush_events_blocking();
}
_ => {}
})
}
The trackEvent function is also available through the JavaScript guest bindings:
import { trackEvent } from "tauri-plugin-telemetry";
trackEvent("save_settings") // An event with no properties
trackEvent("screen_view", { name: "Settings" }) // An event with a custom property
A few important notes:
trackEvent manually (it's recommended to at least track one event at
startup).trackEvent; it runs in the background.You can load the App Key from a .env file at compile time using the
dotenvy_macro crate. The .env file must be in the src-tauri directory.
use tauri_plugin_telemetry::{Builder, EventTracker, InitOptions};
use dotenvy_macro::dotenv;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
let opts = InitOptions {
host: Some("https://analytics.myapp.com".into()),
..Default::default()
};
tauri::Builder::default()
.build(tauri::generate_context!())
.plugin(Builder::new(dotenv!("APP_KEY")).with_options(opts).build())
.expect("Error when building tauri app")
.run(|handler, event| match event {
tauri::RunEvent::Exit { .. } => {
handler.track_event("app_exited", None);
handler.flush_events_blocking();
}
tauri::RunEvent::Ready { .. } => {
handler.track_event("app_started", None);
}
_ => {}
});
}
For AI/LLM integration instructions, see llms.txt
The plugin can point at any backend that implements its ingest protocol.
For most cases, with_host is enough:
tauri_plugin_telemetry::Builder::new("APP_KEY")
.with_host("https://analytics.myapp.com")
.build()
All available options (with their defaults):
use tauri_plugin_telemetry::{Builder, InitOptions};
let opts = InitOptions {
host: Some("https://analytics.myapp.com".into()), // required
api_path: Some("/v1/events".into()), // default: /v1/events
app_key_header: Some("App-Key".into()), // default: App-Key
sdk_name: Some("myapp@1.0.0".into()), // default: <crate>@<version>
flush_interval: Some(Duration::from_secs(60)), // default: 60s release / 2s debug
..Default::default()
};
Builder::new("APP_KEY").with_options(opts).build()
Inspired by the Aptabase analytics platform, which is a great option if you don't want to self-host.
FAQs
Backend-agnostic analytics/telemetry plugin for Tauri v2 apps. Redirect events to any backend.
The npm package tauri-plugin-telemetry receives a total of 0 weekly downloads. As such, tauri-plugin-telemetry popularity was classified as not popular.
We found that tauri-plugin-telemetry demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Threat Research
/Security News
319 browser extensions installed by 13.4 million users hijack searches, capture queries, and collect referral payments from Yahoo and Bing.

Threat Research
Malicious Firefox extensions mimic Phantom, Jupiter, and Bitget wallets to steal recovery phrases and private keys, with one fetching its payload remotely.

Product
Socket Threat Intel now shows which malware campaigns were blocked or detected in your organization, with links to scans and Firewall events.