Umami tracking events
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful

This commit is contained in:
2026-02-17 12:12:32 -03:00
parent d3f6747116
commit 8baf017171
6 changed files with 31 additions and 3 deletions

View File

@@ -9,5 +9,13 @@
</head> </head>
<body data-sveltekit-preload-data="hover"> <body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div> <div style="display: contents">%sveltekit.body%</div>
<img
src="https://analytics.mifi.holdings/pixel.gif"
alt=""
width="1"
height="1"
role="presentation"
loading="eager"
/>
</body> </body>
</html> </html>

View File

@@ -34,6 +34,7 @@
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
aria-describedby={link.description ? descriptionId : undefined} aria-describedby={link.description ? descriptionId : undefined}
data-umami-event={`contact panel ${link.label} link`}
> >
{#if link.icon} {#if link.icon}
<LinkIcon href={link.href} icon={link.icon} label={link.label} /> <LinkIcon href={link.href} icon={link.icon} label={link.label} />

View File

@@ -35,6 +35,7 @@
contactOpen = true; contactOpen = true;
shareOpen = false; shareOpen = false;
}} }}
data-umami-event="header contact button"
> >
<IconContact size={20} /> <IconContact size={20} />
</button> </button>
@@ -47,6 +48,7 @@
shareOpen = true; shareOpen = true;
contactOpen = false; contactOpen = false;
}} }}
data-umami-event="header share button"
> >
<IconShare size={20} /> <IconShare size={20} />
</button> </button>
@@ -98,6 +100,7 @@
contactOpen = true; contactOpen = true;
shareOpen = false; shareOpen = false;
}} }}
data-umami-event="hero contact button"
> >
<IconContact size={20} /> <IconContact size={20} />
<span>Contact</span> <span>Contact</span>
@@ -111,6 +114,7 @@
shareOpen = true; shareOpen = true;
contactOpen = false; contactOpen = false;
}} }}
data-umami-event="hero share button"
> >
<IconShare size={20} /> <IconShare size={20} />
<span>Share</span> <span>Share</span>

View File

@@ -5,7 +5,7 @@
let { href, icon, label, description }: ProcessedLink = $props(); let { href, icon, label, description }: ProcessedLink = $props();
</script> </script>
<a {href} rel="noopener noreferrer" target="_blank" class="link"> <a {href} rel="noopener noreferrer" target="_blank" class="link" data-umami-event={`${label} link`}>
<span class="icon" aria-hidden="true"> <span class="icon" aria-hidden="true">
<LinkIcon {href} {icon} {label} /> <LinkIcon {href} {icon} {label} />
</span> </span>

View File

@@ -57,7 +57,12 @@
/> />
</div> </div>
{/if} {/if}
<button type="button" class="panel-btn" onclick={copyLink}> <button
type="button"
class="panel-btn"
onclick={copyLink}
data-umami-event="share panel copy"
>
<IconCopy size={20} /> <IconCopy size={20} />
{copied ? 'Copied!' : 'Copy link'} {copied ? 'Copied!' : 'Copy link'}
</button> </button>
@@ -67,12 +72,18 @@
onclick={onclose} onclick={onclose}
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
data-umami-event="share panel email link"
> >
<IconEmail size={20} /> <IconEmail size={20} />
Email link Email link
</a> </a>
{#if canShare} {#if canShare}
<button type="button" class="panel-btn" onclick={share}> <button
type="button"
class="panel-btn"
onclick={share}
data-umami-event="share panel device share"
>
<IconShare size={20} /> <IconShare size={20} />
Share… Share…
</button> </button>

View File

@@ -45,6 +45,7 @@
aria-label="Close theme menu" aria-label="Close theme menu"
tabindex="-1" tabindex="-1"
onclick={() => (expanded = false)} onclick={() => (expanded = false)}
data-umami-event="theme toggle close"
></button> ></button>
{/if} {/if}
@@ -64,6 +65,7 @@
aria-current={current === 'light' ? 'true' : undefined} aria-current={current === 'light' ? 'true' : undefined}
title="Light" title="Light"
onclick={() => handleClick('light')} onclick={() => handleClick('light')}
data-umami-event="theme toggle light"
> >
<Sun size={24} /> <Sun size={24} />
</button> </button>
@@ -75,6 +77,7 @@
aria-current={current === 'dark' ? 'true' : undefined} aria-current={current === 'dark' ? 'true' : undefined}
title="Dark" title="Dark"
onclick={() => handleClick('dark')} onclick={() => handleClick('dark')}
data-umami-event="theme toggle dark"
> >
<Moon size={24} /> <Moon size={24} />
</button> </button>
@@ -86,6 +89,7 @@
aria-current={current === 'auto' ? 'true' : undefined} aria-current={current === 'auto' ? 'true' : undefined}
title="Auto (system)" title="Auto (system)"
onclick={() => handleClick('auto')} onclick={() => handleClick('auto')}
data-umami-event="theme toggle auto"
> >
<SunMoon size={24} /> <SunMoon size={24} />
</button> </button>