summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2024-05-02 21:56:19 -0400
committerGitHub <noreply@github.com>2024-05-02 21:56:19 -0400
commitcc85dc05b7117abce941b71843c192b38cb8182a (patch)
treef9c8a09eac6d18832eeba627197f68248302978b
parentae171f8b83f6e5389344280e0e21eaabe0b7b435 (diff)
downloadspack-cc85dc05b7117abce941b71843c192b38cb8182a.tar.gz
spack-cc85dc05b7117abce941b71843c192b38cb8182a.tar.bz2
spack-cc85dc05b7117abce941b71843c192b38cb8182a.tar.xz
spack-cc85dc05b7117abce941b71843c192b38cb8182a.zip
docs: re-enable google analytics (#43974)
We recently switched to using the new ReadTheDocs with "addons". That includes its own analytics, which is nice, but we also want to continue using our GA4 analytics. Adding GA4 is no longer supported by RTD, so we have to add it manually. - [x] re-add the gtag to all pages, manually Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
-rw-r--r--lib/spack/docs/_templates/layout.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/spack/docs/_templates/layout.html b/lib/spack/docs/_templates/layout.html
new file mode 100644
index 0000000000..393cb1ebc1
--- /dev/null
+++ b/lib/spack/docs/_templates/layout.html
@@ -0,0 +1,12 @@
+{% extends "!layout.html" %}
+
+{%- block extrahead %}
+ <!-- Google tag (gtag.js) -->
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-S0PQ7WV75K"></script>
+ <script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+ gtag('config', 'G-S0PQ7WV75K');
+ </script>
+{% endblock %}