diff --git a/astro/public/js/Search-0.2.0.js b/astro/public/js/Search-0.2.1.js similarity index 97% rename from astro/public/js/Search-0.2.0.js rename to astro/public/js/Search-0.2.1.js index 982337fc8f..45e2ec69b8 100644 --- a/astro/public/js/Search-0.2.0.js +++ b/astro/public/js/Search-0.2.1.js @@ -171,6 +171,16 @@ class Search { paths = paths.slice(1, paths.length); const environment = paths.shift(); + try { + if (gtag) { + gtag('event', 'site_search', { + 'search_parameter': this.#searchInput.value, + }); + } + } catch (e) { + //ignore + } + if (!this.#pagefind) { this.#pagefind = await import("/pagefind/pagefind.js"); // prime the filters diff --git a/astro/src/components/Head.astro b/astro/src/components/Head.astro index 51eff3bdb1..608b5c6b08 100644 --- a/astro/src/components/Head.astro +++ b/astro/src/components/Head.astro @@ -32,7 +32,7 @@ const isProd = import.meta.env.PROD as boolean; - + { hasDark && } @@ -64,6 +64,17 @@ const isProd = import.meta.env.PROD as boolean; j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-5P7VLHG'); + + + + +