chore: add more umami event links

This commit is contained in:
Stefan Imhoff
2024-09-13 20:00:49 +02:00
parent 63b0f69772
commit 81051c919f
6 changed files with 8 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ const isExternal = (href as string).startsWith('http');
<a
class:list={['link', { external: isExternal }, className]}
data-umami-event={isExternal ? `Link: ${href}` : undefined}
href={href}
rel={isExternal ? 'nofollow noopener noreferrer' : undefined}
target={isExternal ? '_blank' : undefined}