Merge pull request #29 from CrispyBaguette/event-tracking

umami event tracking
This commit is contained in:
CrispyBaguette 2023-06-07 12:21:18 +02:00 committed by GitHub
commit 7e1dc8c443
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -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");
}
};

View File

@ -69,6 +69,7 @@ function ImageInput({ onImageSubmit }: Props) {
<button
type="submit"
value="Go"
data-umami-event="image submit"
className={
"block " +
"w-32 " +