diff --git a/src/layouts/partials/analytics.html b/src/layouts/partials/analytics.html
index 7bc14907b..c238a6276 100644
--- a/src/layouts/partials/analytics.html
+++ b/src/layouts/partials/analytics.html
@@ -1 +1 @@
-
+
diff --git a/src/layouts/partials/head.html b/src/layouts/partials/head.html
index 9bd3036b0..31ce3eb3c 100644
--- a/src/layouts/partials/head.html
+++ b/src/layouts/partials/head.html
@@ -24,5 +24,6 @@
{{ partial "stylesheet" . -}}
{{ partial "favicons" . -}}
{{ partial "social" . -}}
-{{ partial "scripts" . -}}
+{{- if hugo.IsProduction }}
{{ partial "analytics" . -}}
+{{- end }}