From 9dcc8d587de51c3a59da8f780b48e88ea8a54f13 Mon Sep 17 00:00:00 2001 From: Izan Gil <66965250+SrIzan10@users.noreply.github.com> Date: Fri, 19 Jul 2024 22:04:27 +0200 Subject: [PATCH] feat: analytics --- astro.config.mjs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/astro.config.mjs b/astro.config.mjs index 94a812de9..1e3338cc7 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -112,6 +112,22 @@ export default defineConfig({ }] }, ], + head: [ + !import.meta.env.DEV ? { + tag: 'script', + attrs: { + src: 'https://analytics.sern.dev/script.js', + 'data-website-id': 'db608ae9-3ae2-49ed-9f7c-3ba0d5abe1b6', + defer: true, + }, + } : { + tag: 'meta', + attrs: { + name: 'isdev', + content: 'true', + }, + }, + ], plugins: [starlightBlog({ authors: { jacoobes: {