feat: conditionally track app launch, exit, and failure events based on trackingEnabled state

This commit is contained in:
2025-12-07 16:21:21 +01:00
parent a338df6a36
commit b8ebcf5509

View File

@@ -181,7 +181,7 @@
};
const launch = async () => {
umami.track('app_launch_osu');
if ($trackingEnabled) umami.track('app_launch_osu');
const osuRunning = await isOsuRunning();
if (osuRunning) {
toast.error('Hold on a second!', {
@@ -485,7 +485,7 @@
}
await runOsu(osuPath, true);
umami.track('app_exit_osu');
if ($trackingEnabled) umami.track('app_exit_osu');
launchInfo = 'Cleaning up...';
await getCurrentWindow().show();
if (presenceUpdater) {
@@ -536,7 +536,7 @@
description: 'Failed to launch.',
});
launching.set(false);
umami.track('app_launch_fail', { error: err });
if ($trackingEnabled) umami.track('app_launch_fail', { error: err });
}
};