diff --git a/src/components/CopyPageButton.tsx b/src/components/CopyPageButton.tsx index cde510f3346062d..b6a0588f4c74a01 100644 --- a/src/components/CopyPageButton.tsx +++ b/src/components/CopyPageButton.tsx @@ -16,6 +16,7 @@ import { PiCheckCircleLight, PiXCircleLight, } from "react-icons/pi"; +import { track } from "~/util/zaraz"; type CopyState = "idle" | "success" | "error"; @@ -40,6 +41,9 @@ export default function CopyPageButton() { const handleViewMarkdown = () => { const markdownUrl = new URL("index.md", window.location.href).toString(); + track("clicked copy page button", { + value: "view markdown", + }); window.open(markdownUrl, "_blank"); }; @@ -54,6 +58,9 @@ export default function CopyPageButton() { const markdown = await response.text(); await navigator.clipboard.writeText(markdown); + track("clicked copy page button", { + value: "copy markdown", + }); setCopyState("success"); setTimeout(() => { diff --git a/src/components/SubtractIPCalculator.tsx b/src/components/SubtractIPCalculator.tsx index 75da6e02b9774f0..b64f33134554150 100644 --- a/src/components/SubtractIPCalculator.tsx +++ b/src/components/SubtractIPCalculator.tsx @@ -1,5 +1,6 @@ import { useEffect, useState } from "react"; import { excludeCidr, parseCidr } from "cidr-tools"; +import { track } from "~/util/zaraz"; export default function SubtractIPCalculator({ defaults, @@ -16,6 +17,7 @@ export default function SubtractIPCalculator({ function calculate() { setResult(excludeCidr(base, exclude)); + track("clicked calculator submit"); } function disableButton() {