Skip to content

Commit

Permalink
Use plausible.io/script.js instead of plausible-tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
wgenh committed Jun 3, 2024
1 parent 5535966 commit 819ffa9
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"autoprefixer": "^10.4.19",
"comlink": "^4.4.1",
"jssha": "^3.3.1",
"plausible-tracker": "^0.3.9",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"xz-decompress": "^0.2.1"
Expand Down
1 change: 1 addition & 0 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script defer data-domain="flash.comma.ai" src="https://plausible.io/js/script.js"></script>
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
Expand Down
6 changes: 0 additions & 6 deletions src/lib/utils/fastboot.svelte.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FastbootDevice, setDebugLevel } from "android-fastboot";
import * as Comlink from "comlink";
import Plausible from 'plausible-tracker';
import config from "$lib/utils/config";
import { download } from "$lib/utils/blob";
import { useImageWorker } from "$lib/utils/image";
Expand Down Expand Up @@ -152,12 +151,10 @@ let onContinue = $state({ value: null });
let onRetry = $state({ value: null });
let fastboot = $state({ value: new FastbootDevice() });
let manifest = $state({ value: null });
let trackEvent = $state(null);
let imageWorker = $state(null);
let busy = $state(false);
export function useFastboot() {
$effect(() => {
trackEvent = Plausible({ domain: 'flash.comma.ai' }).trackEvent;
progress.value = -1;
message.value = "";

Expand Down Expand Up @@ -251,7 +248,6 @@ export function useFastboot() {
}
serial.value = deviceInfo["serialno"] || "unknown";
connected.value = true;
trackEvent('device-connected');
step.value = Step.DOWNLOADING;
})
.catch((err) => {
Expand Down Expand Up @@ -395,7 +391,6 @@ export function useFastboot() {
.then(() => {
console.debug("[fastboot] Erase complete");
step.value = Step.DONE;
trackEvent('completed');
busy = false;
})
.catch((err) => {
Expand All @@ -410,7 +405,6 @@ export function useFastboot() {
$effect(() => {
if (error.value !== Error.NONE) {
console.debug("[fastboot] error", error.value);
trackEvent('error', { props: { error: error.value } });
progress.value = -1;
onContinue.value = null;
onRetry.value = () => {
Expand Down

0 comments on commit 819ffa9

Please sign in to comment.