diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index ebaab67a..5c27e860 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -30,12 +30,11 @@
{{ partialCached "head-css.html" . }}
-
- {{- if and (eq hugo.Environment "production") (or .Site.GoogleAnalytics .Site.Config.Services.GoogleAnalytics.ID) }}
-
- {{ partial "google-analytics.html" . }}
- {{- end }}
-
+
+{{- if and (eq hugo.Environment "production") .Site.Config.Services.GoogleAnalytics.ID }}
+
+ {{ partial "google-analytics.html" . }}
+{{- end }}