feat: add rybbit tracking
This commit is contained in:
@@ -19,6 +19,8 @@ interface Props {
|
|||||||
|
|
||||||
const { title, description = 'Alex Lebens', ogImage, lang = 'en', structuredData } = Astro.props;
|
const { title, description = 'Alex Lebens', ogImage, lang = 'en', structuredData } = Astro.props;
|
||||||
|
|
||||||
|
const rybbitSiteId = "YOUR_SITE_ID";
|
||||||
|
|
||||||
const global = await directus.request(readSingleton('site_global'));
|
const global = await directus.request(readSingleton('site_global'));
|
||||||
const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
|
const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
|
||||||
---
|
---
|
||||||
@@ -53,6 +55,12 @@ const normalizeTitle = !title ? global.name : `${title} | ${global.name}`;
|
|||||||
}
|
}
|
||||||
window.localStorage.setItem('theme', theme);
|
window.localStorage.setItem('theme', theme);
|
||||||
</script>
|
</script>
|
||||||
|
<!-- Rybbit Tracking Snippet -->
|
||||||
|
<script
|
||||||
|
src="https://rybbit.alexlebens.dev/api/script.js"
|
||||||
|
data-site-id={global.rybbit_site_id}
|
||||||
|
defer
|
||||||
|
></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-stone-200 selection:bg-yellow-400 selection:text-neutral-700 dark:bg-stone-700">
|
<body class="bg-stone-200 selection:bg-yellow-400 selection:text-neutral-700 dark:bg-stone-700">
|
||||||
<div class="mx-auto w-full max-w-(--breakpoint-2xl) grow px-4 sm:px-6 lg:px-8">
|
<div class="mx-auto w-full max-w-(--breakpoint-2xl) grow px-4 sm:px-6 lg:px-8">
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export type Global = {
|
|||||||
initials: string;
|
initials: string;
|
||||||
email: string;
|
email: string;
|
||||||
site_url: string;
|
site_url: string;
|
||||||
|
rybbit_site_id: string;
|
||||||
logo: string;
|
logo: string;
|
||||||
portrait: string;
|
portrait: string;
|
||||||
portrait_alt: string;
|
portrait_alt: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user