diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index a95b19d..a1eec1a 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -37,7 +37,11 @@
{{- end }}
{{- if not .Site.IsServer }}
+ {{- if hasPrefix .Site.GoogleAnalytics "G-" }}
+ {{ template "_internal/google_analytics.html" . }}
+ {{- else }}
{{ template "_internal/google_analytics_async.html" . }}
+ {{- end }}
{{- end }}