hugo/tpl/tplimpl/embedded/templates/google_analytics_async.html

11 lines
359 B
HTML
Raw Normal View History

{{- $pc := .Site.PrivacyConfig.GoogleAnalytics -}}
{{- if not $pc.Disable -}}
{{ with .Site.GoogleAnalytics }}
<script>
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 -}}