2018-05-21 08:21:36 +00:00
|
|
|
{{- $pc := .Site.PrivacyConfig.GoogleAnalytics -}}
|
2018-05-20 18:00:29 +00:00
|
|
|
{{- if not $pc.Disable -}}
|
2018-05-04 15:53:56 +00:00
|
|
|
{{ with .Site.GoogleAnalytics }}
|
|
|
|
<script>
|
2018-05-21 08:18:36 +00:00
|
|
|
{{ 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');
|
|
|
|
}
|
2018-05-04 15:53:56 +00:00
|
|
|
</script>
|
|
|
|
<script async src='//www.google-analytics.com/analytics.js'></script>
|
2018-05-20 18:00:29 +00:00
|
|
|
{{ end }}
|
|
|
|
{{- end -}}
|