Website Summary Files Commits Branches @commit @diff @stats
path: root / website / themes / hugo-clarity / layouts / partials / analytics.html
diff options
context:
space:
mode:
Commit2009581d7233cd70af8517cbb9673569a8edac73 (patch)
Author
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-08-18 15:18:25 +0300
Committer
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-08-18 15:18:25 +0300
Filese33db0350db7ac2a035cefb5b090c9aceaf481af /website/themes/hugo-clarity/layouts/partials/analytics.html
IPL-2009581d7233cd70af8517cbb9673569a8edac73.tar
IPL-2009581d7233cd70af8517cbb9673569a8edac73.tar.gz
IPL-2009581d7233cd70af8517cbb9673569a8edac73.zip
Parent4382deb1b9e2e7e8a90fc617f93d78f2c57e71e1 (diff)
Parent8dad1d1bd0bc7206f16323d220fdce73c400f470 (diff)
Merge commit '8dad1d1bd0bc7206f16323d220fdce73c400f470' as 'website/themes/hugo-clarity'
1 files changed, 9 insertions, 0 deletions
-rw-r--r--website/themes/hugo-clarity/layouts/partials/analytics.html9
diff --git a/website/themes/hugo-clarity/layouts/partials/analytics.html b/website/themes/hugo-clarity/layouts/partials/analytics.html
new file mode 100644
index 0000000..9c2a200
--- /dev/null
+++ b/website/themes/hugo-clarity/layouts/partials/analytics.html
@@ -0,0 +1,9 @@
+{{- with .Site.Params.ga_analytics }}
+<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
+<script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+ gtag('config', '{{ . }}');
+</script>
+{{- end -}}