aboutsummaryrefslogtreecommitdiff
path: root/_includes/google-analytics.html
diff options
context:
space:
mode:
authorBradley Taunt <bt@btxx.org>2024-05-26 08:33:15 -0400
committerBradley Taunt <bt@btxx.org>2024-05-26 08:33:15 -0400
commit7bc33e9815001f96ef6b22c507cf9bf2194ec684 (patch)
tree222dd13a36f6ec18e766ba98744fc01cdea5eea7 /_includes/google-analytics.html
parente417a818e207a6cca6e2f3c471611673ab836a62 (diff)
Static placement of minima theme, minor customizations
Diffstat (limited to '_includes/google-analytics.html')
-rw-r--r--_includes/google-analytics.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/_includes/google-analytics.html b/_includes/google-analytics.html
new file mode 100644
index 0000000..b8b4d38
--- /dev/null
+++ b/_includes/google-analytics.html
@@ -0,0 +1,9 @@
+<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
+<script>
+ window['ga-disable-{{ site.google_analytics }}'] = window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1";
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){window.dataLayer.push(arguments);}
+ gtag('js', new Date());
+
+ gtag('config', '{{ site.google_analytics }}');
+</script>