Update analytics configuration

This commit is contained in:
Korbs 2024-07-09 21:35:18 -04:00
parent b09a551121
commit 2e77327d3c

View file

@ -25,15 +25,11 @@ const {
EmbedTitle,
} = Astro.props
// Configuration
import {
STATISTICS,
ANALYLICS_TOOL,
ANALYLICS_ID,
SCRIPT_SRC,
DOMAIN,
SERVER_DOMAIN
} from '@utils/GetConfig'
// Components
import Analytics from "@components/global/Analytics.astro";
// Configuration
import {SERVER_DOMAIN} from '@utils/GetConfig'
// Icons
import { Donate, Download, ShareIos, ThumbsUp } from '@iconoir/vue'
@ -68,24 +64,6 @@ if (Astro.url.href.match('watch')) {
<link rel="apple-touch-icon" type="image/png" sizes="256x256" href="/images/logo/Favicon.png">
<link rel="icon" type="image/png" sizes="256x256" href="/images/logo/Favicon.png">
<!-- Analytics -->
{STATISTICS ?
() => {
if (ANALYLICS_TOOL === "Plausible") {
return (
<script defer data-domain={DOMAIN} src={SCRIPT_SRC}></script>
)
}
if (ANALYLICS_TOOL === "Umami") {
return (
<script async src={SCRIPT_SRC} data-website-id={ANALYLICS_ID}></script>
)
}
}
:
null
}
<!-- Video Embed -->
{IsVideo ?
<meta property="og:type" content="video.other">
@ -99,4 +77,7 @@ if (Astro.url.href.match('watch')) {
:
null
}
</head>
<script src="https://cdn.jsdelivr.net/npm/pace-js@latest/pace.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pace-js@latest/pace-theme-default.min.css">
</head>
<Analytics/>