Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zerostaticthemes/hugo-serif-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/google-analytics.html')
-rw-r--r--layouts/partials/google-analytics.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/google-analytics.html b/layouts/partials/google-analytics.html
index cf29915..8a58a62 100644
--- a/layouts/partials/google-analytics.html
+++ b/layouts/partials/google-analytics.html
@@ -1,4 +1,4 @@
-{{- if not .Site.IsServer -}}
+{{- if and (not .Site.IsServer) hugo.IsProduction -}}
{{ with getenv "HUGO_GOOGLE_ANALYTICS_ID" | default .Site.Params.google_analytics_id }}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{- . -}}"></script>