{{- $pc := .Site.PrivacyConfig.GoogleAnalytics -}} {{- if not $pc.Disable -}} {{ with .Site.GoogleAnalytics }} {{ end }} {{- end -}} {{- define "__ga_js_set_doNotTrack" -}}{{/* This is also used in the async version. */}} {{- $pc := .Site.PrivacyConfig.GoogleAnalytics -}} {{- if not $pc.RespectDoNotTrack -}} var doNotTrack = false; {{- else -}} var dnt = (navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack); var doNotTrack = (dnt == "1" || dnt == "yes"); {{- end -}} {{- end -}}