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

github.com/vantagedesign/ace-documentation.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian <julian@vantage-design.com>2020-05-11 15:35:36 +0300
committerGitHub <noreply@github.com>2020-05-11 15:35:36 +0300
commit9912a441ec745cfebff66dc670d0ec06c8971381 (patch)
treeb431e6346a151cc6f8fca168c580e687a990c15a
parentf1217193f37aeb58d51c4a2f1e6069b56ac681a2 (diff)
parent0715006f893e9208775d505512175274b001fb84 (diff)
Merge pull request #7 from jhollowe/patch-3
Allow Google Analytics to only track production site
-rw-r--r--layouts/partials/head.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index e2b6a5a..1e7e079 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -17,6 +17,9 @@
{{ $style := resources.Get "css/ace.scss" | toCSS | minify }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
- {{ template "_internal/google_analytics_async.html" . }}
+ <!-- Only include the tracking when using `hugo` or adding `--environment production` -->
+ {{ if eq hugo.Environment "production" }}
+ {{ template "_internal/google_analytics_async.html" . }}
+ {{ end }}
</head>