Skip to content

Commit 1cdaee2

Browse files
committed
Don't use Google Analytics, switch to Umami instead
1 parent 34ce69d commit 1cdaee2

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

src/layouts/Layout.astro

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,18 @@ const isAbout = pageTitle === 'About';
4545
document.documentElement.classList.remove('dark');
4646
}
4747
</script>
48-
<script
49-
type='text/partytown'
50-
async
51-
src='https://www.googletagmanager.com/gtag/js?id=G-LF96D9G25P'></script>
52-
<script type='text/partytown'>
53-
window.dataLayer = window.dataLayer || [];
54-
function gtag() {
55-
dataLayer.push(arguments);
56-
}
57-
gtag('js', new Date());
5848

59-
gtag('config', 'G-LF96D9G25P');
60-
</script>
49+
<!-- Umami -->
50+
{
51+
import.meta.env.PROD && (
52+
<script
53+
is:inline
54+
defer
55+
src='https://cloud.umami.is/script.js'
56+
data-website-id='83ed76ba-431f-457e-bff9-f9a30e560544'
57+
/>
58+
)
59+
}
6160
</head>
6261
<body class='flex min-h-screen flex-col pt-16 bg-white dark:bg-dark-bg'>
6362
<Header pageTitle={pageTitle} />

0 commit comments

Comments
 (0)