From df4408acff78b6a4e8ceb0a67aecb91442301977 Mon Sep 17 00:00:00 2001 From: viralpraxis Date: Wed, 13 Aug 2025 15:42:13 +0400 Subject: [PATCH] Add plausible-analytics integration To make it work locally, point `PLAUSIBLE_SCRIPT_URL` to your local installation's script URL (e.g. `https://plausible.localhost/js/script.local.js`) and set `PLAUSIBLE_DOMAIN` to your domain. --- src/components/HeadTags.astro | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/HeadTags.astro b/src/components/HeadTags.astro index 22c8d84..026b387 100644 --- a/src/components/HeadTags.astro +++ b/src/components/HeadTags.astro @@ -1,9 +1,22 @@ +--- +const plausibleDomain = import.meta.env.PLAUSIBLE_DOMAIN; +const plausibleScriptURL = import.meta.env.PLAUSIBLE_SCRIPT_URL || 'https://plausible.io/js/script.js'; +--- + +{plausibleDomain && ( + +)} +