Add Umami analytics

This commit is contained in:
Maciej Pędzich 2024-07-21 18:01:47 +02:00
parent 7a13c9e7da
commit 4025837678
Signed by: maciejpedzich
GPG Key ID: CE4A303D84882F0D
2 changed files with 14 additions and 1 deletions

View File

@ -10,6 +10,10 @@ import NavLink from './NavLink.astro';
<NavLink href="https://github.com/maciejpedzich">GitHub</NavLink>
<NavLink href="https://notacult.social/@macindahaus">Mastodon</NavLink>
<NavLink href="https://twitter.com/maciejpedzich">Twitter</NavLink>
<NavLink
href="https://analytics.maciejpedzi.ch/share/eodLjhuAE51MBSth/maciejpedzi.ch"
>Analytics</NavLink
>
</nav>
</footer>

View File

@ -18,7 +18,7 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const actualTitle = title === 'home' ? SITE_TITLE : `${title} | ${SITE_TITLE}`;
---
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
@ -40,6 +40,15 @@ const actualTitle = title === 'home' ? SITE_TITLE : `${title} | ${SITE_TITLE}`;
<meta property="twitter:title" content={actualTitle} />
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content={new URL(image, Astro.url)} />
{
import.meta.env.PROD && (
<script
defer
src="https://analytics.maciejpedzi.ch/script.js"
data-website-id="2c62b92b-6fde-4ee5-97ab-9c97d7a5a1b4"
/>
)
}
</head>
<body>
<Header />