{{ with site.Params.features.analytics }} {{ if or .enable .enabled }} {{ with .services }} {{ with .google }} {{ $privacyConfig:= dict (slice "Site" "Config" "Privacy" "GoogleAnalytics") $.Site.Config.Privacy.GoogleAnalytics }} {{ $analyticsConfig := dict (slice "Site" "GoogleAnalytics") .id }} {{ template "_internal/google_analytics.html" (merge $privacyConfig $analyticsConfig) }} {{ end }} {{ with .counterDev }} {{ end }} {{ with .goatCounter }} {{ with .code }} {{ else }} {{ end }} {{ end }} {{ with .matomo }} {{ end }} {{ with .cloudflare }} {{ end }} {{ end }} {{ end }} {{ end }} {{ if .Site.Config.Services.GoogleAnalytics.ID }} {{ template "_internal/google_analytics.html" . }} {{ end }}