umami event tracking #29
@ -26,9 +26,11 @@ function App() {
|
|||||||
const ditheredImage = await new Ditherer().dither(imageArray, palette);
|
const ditheredImage = await new Ditherer().dither(imageArray, palette);
|
||||||
setDitheredImage(new Blob([ditheredImage], { type: "image/png" }));
|
setDitheredImage(new Blob([ditheredImage], { type: "image/png" }));
|
||||||
setAppState(AppState.IMAGE_PROCESSED);
|
setAppState(AppState.IMAGE_PROCESSED);
|
||||||
|
(window as any).umami.track("image processed");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
window.alert("Something went wrong. Please try again.");
|
window.alert("Something went wrong. Please try again.");
|
||||||
|
(window as any).umami.track("processing error");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ function ImageInput({ onImageSubmit }: Props) {
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
value="Go"
|
value="Go"
|
||||||
|
data-umami-event="image submit"
|
||||||
className={
|
className={
|
||||||
"block " +
|
"block " +
|
||||||
"w-32 " +
|
"w-32 " +
|
||||||
|
Loading…
Reference in New Issue
Block a user