blob: 48a24c1c038e2c8e24c257d4107e5a97e80d093c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{{- $pc := .Site.PrivacyConfig.GoogleAnalytics -}}
{{- if not $pc.Disable -}}
{{ with .Site.GoogleAnalytics }}
<script>
{{ template "__ga_js_set_doNotTrack" $ }}
if (!doNotTrack) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', '{{ . }}', 'auto');
ga('send', 'pageview');
}
</script>
<script async src='//www.google-analytics.com/analytics.js'></script>
{{ end }}
{{- end -}}
|