From 0501562a8e31110e6bd9655bffee745e991b6ba0 Mon Sep 17 00:00:00 2001 From: mathis <37186532+maaaathis@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:08:44 +0100 Subject: [PATCH] feat: add analytic events (#397) * feat: add analytic events * add goto-certsho-overview event --- .../[domain]/(overview)/_components/IpOverviewItem.tsx | 6 +++++- .../[domain]/(overview)/_components/TechnologiesWidget.tsx | 2 +- app/lookup/[domain]/_components/ShareButton.tsx | 1 + app/lookup/[domain]/certs/page.tsx | 6 +++++- app/lookup/[domain]/dns/_components/DnsHistoryButton.tsx | 6 +++++- .../dns/_components/FlushCloudflareDnsCacheButton.tsx | 6 +++++- .../[domain]/dns/_components/FlushGoogleDnsCacheButton.tsx | 6 +++++- app/lookup/[domain]/dns/_components/IpLink.tsx | 6 +++++- components/CopyButton.tsx | 2 +- components/ThemeToggle.tsx | 3 +++ 10 files changed, 36 insertions(+), 8 deletions(-) diff --git a/app/lookup/[domain]/(overview)/_components/IpOverviewItem.tsx b/app/lookup/[domain]/(overview)/_components/IpOverviewItem.tsx index 1ea388ff..bac77f4a 100644 --- a/app/lookup/[domain]/(overview)/_components/IpOverviewItem.tsx +++ b/app/lookup/[domain]/(overview)/_components/IpOverviewItem.tsx @@ -28,7 +28,11 @@ const IpOverviewItem: FC = ({ <> - +
diff --git a/app/lookup/[domain]/(overview)/_components/TechnologiesWidget.tsx b/app/lookup/[domain]/(overview)/_components/TechnologiesWidget.tsx index 164c22e4..d37b7a76 100644 --- a/app/lookup/[domain]/(overview)/_components/TechnologiesWidget.tsx +++ b/app/lookup/[domain]/(overview)/_components/TechnologiesWidget.tsx @@ -62,7 +62,7 @@ const TechnologiesWidget: React.FC = async ({ return ( - + { variant="secondary" className="flex h-6 shrink-0 flex-row gap-2 rounded-lg p-2 text-xs" onClick={handleShareCall} + data-umami-event="share" > {isCopied ? ( <> diff --git a/app/lookup/[domain]/certs/page.tsx b/app/lookup/[domain]/certs/page.tsx index 83266b62..9670a353 100644 --- a/app/lookup/[domain]/certs/page.tsx +++ b/app/lookup/[domain]/certs/page.tsx @@ -164,7 +164,10 @@ const CertsResultsPage: FC = async ({ - + = async ({ } target="_blank" rel="noreferrer noopener" + data-umami-event="goto-certsh-overview" className="cursor-pointer select-none decoration-slate-700 decoration-dotted underline-offset-4 hover:underline dark:decoration-slate-300" > Sectigo's crt.sh diff --git a/app/lookup/[domain]/dns/_components/DnsHistoryButton.tsx b/app/lookup/[domain]/dns/_components/DnsHistoryButton.tsx index f95c11e2..4e361f35 100644 --- a/app/lookup/[domain]/dns/_components/DnsHistoryButton.tsx +++ b/app/lookup/[domain]/dns/_components/DnsHistoryButton.tsx @@ -20,7 +20,11 @@ export const DnsHistoryButton: FC = (props) => { rel="noopener nofollow" className="my-auto" > - diff --git a/app/lookup/[domain]/dns/_components/FlushCloudflareDnsCacheButton.tsx b/app/lookup/[domain]/dns/_components/FlushCloudflareDnsCacheButton.tsx index 574a47ca..7f9b7077 100644 --- a/app/lookup/[domain]/dns/_components/FlushCloudflareDnsCacheButton.tsx +++ b/app/lookup/[domain]/dns/_components/FlushCloudflareDnsCacheButton.tsx @@ -14,7 +14,11 @@ export const FlushCloudflareDnsCacheButton: FC = () => { rel="noopener" className="my-auto" > - diff --git a/app/lookup/[domain]/dns/_components/FlushGoogleDnsCacheButton.tsx b/app/lookup/[domain]/dns/_components/FlushGoogleDnsCacheButton.tsx index 0e0dbb7f..341dae17 100644 --- a/app/lookup/[domain]/dns/_components/FlushGoogleDnsCacheButton.tsx +++ b/app/lookup/[domain]/dns/_components/FlushGoogleDnsCacheButton.tsx @@ -14,7 +14,11 @@ export const FlushGoogleDnsCacheButton: FC = () => { rel="noopener" className="my-auto" > - diff --git a/app/lookup/[domain]/dns/_components/IpLink.tsx b/app/lookup/[domain]/dns/_components/IpLink.tsx index 447a5507..1e06dc88 100644 --- a/app/lookup/[domain]/dns/_components/IpLink.tsx +++ b/app/lookup/[domain]/dns/_components/IpLink.tsx @@ -24,7 +24,11 @@ const IpLink: FC = ({ value }): ReactElement => { <> - + {value} = ({ value }): ReactElement => { return ( - + setTheme('dark')} + data-umami-event="theme-select-dark" > @@ -37,6 +38,7 @@ export default function ThemeToggle() { size="icon" className="w-full rounded-2xl" onClick={() => setTheme('light')} + data-umami-event="theme-select-light" > @@ -45,6 +47,7 @@ export default function ThemeToggle() { size="icon" className="w-full rounded-2xl" onClick={() => setTheme('system')} + data-umami-event="theme-select-auto" >