From 3c56bbdc0ebb576b14469810e6b563b05d9e3579 Mon Sep 17 00:00:00 2001 From: CrispyBaguette Date: Wed, 7 Jun 2023 12:20:55 +0200 Subject: [PATCH] umami event tracking --- client/src/App.tsx | 2 ++ client/src/ImageInput.tsx | 1 + 2 files changed, 3 insertions(+) diff --git a/client/src/App.tsx b/client/src/App.tsx index 6dfe672..7fab080 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -26,9 +26,11 @@ function App() { const ditheredImage = await new Ditherer().dither(imageArray, palette); setDitheredImage(new Blob([ditheredImage], { type: "image/png" })); setAppState(AppState.IMAGE_PROCESSED); + (window as any).umami.track("image processed"); } catch (e) { console.error(e); window.alert("Something went wrong. Please try again."); + (window as any).umami.track("processing error"); } }; diff --git a/client/src/ImageInput.tsx b/client/src/ImageInput.tsx index 60277cc..8561060 100644 --- a/client/src/ImageInput.tsx +++ b/client/src/ImageInput.tsx @@ -69,6 +69,7 @@ function ImageInput({ onImageSubmit }: Props) {