Website Summary Files Commits Branches @commit @diff @stats
path: root / website / themes / hugo-clarity / layouts / partials / analytics.html
blob: 9c2a200e02bc2c5e09401115e3f3aa74cc67e9cb (plain) (blame)
1
2
3
4
5
6
7
8
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 -}}