From 4dfeb5537e67e38f72e39ae8ad5408e57f245ff6 Mon Sep 17 00:00:00 2001 From: Wojtek Majewski Date: Mon, 10 Nov 2025 12:14:21 +0100 Subject: [PATCH] chore: add code overlay click and scroll tracking --- pkgs/website/astro.config.mjs | 4 ++ pkgs/website/src/components/CodeOverlay.astro | 37 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/pkgs/website/astro.config.mjs b/pkgs/website/astro.config.mjs index aa1ba1477..03339cfa0 100644 --- a/pkgs/website/astro.config.mjs +++ b/pkgs/website/astro.config.mjs @@ -86,6 +86,10 @@ export default defineConfig({ src: PLAUSIBLE_PROXY.url + PLAUSIBLE_PROXY.scriptPath, }, }, + { + tag: 'script', + content: `window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }`, + }, { tag: 'meta', attrs: { diff --git a/pkgs/website/src/components/CodeOverlay.astro b/pkgs/website/src/components/CodeOverlay.astro index 24cb27b21..a3d565eb8 100644 --- a/pkgs/website/src/components/CodeOverlay.astro +++ b/pkgs/website/src/components/CodeOverlay.astro @@ -317,9 +317,22 @@