add analytics

This commit is contained in:
outfoxxed 2024-11-09 03:09:09 -08:00
parent ea8b02fc3b
commit 35b3c9ad47
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
3 changed files with 10 additions and 2 deletions

View file

@ -76,9 +76,10 @@ in {
chmod +rw -R node_modules
'';
PRODUCTION = true;
SECRET_MODULES_PATH = quickshell-types or "";
buildPhase = ''
${if quickshell-types != null then "export SECRET_MODULES_PATH=${quickshell-types}" else ""}
echo SECRET_MODULES_PATH: $SECRET_MODULES_PATH
HOME=$(pwd)/garbage-tooling yarn build
'';

View file

@ -0,0 +1,4 @@
---
const production = import.meta.env.PRODUCTION;
---
{production && <script is:inline defer data-domain="quickshell.outfoxxed.me" src="https://plausible.outfoxxed.me/js/script.js"></script>}

View file

@ -2,6 +2,7 @@
import "@styles/global.css";
import "@fontsource-variable/rubik";
import "@fontsource-variable/rubik/wght-italic.css";
import Analytics from "@components/Analytics.astro";
interface Props {
title: string;
@ -36,3 +37,5 @@ const { title, description } = Astro.props;
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
<!-- <meta name="twitter:image" content={image} /> -->
<Analytics/>