diff options
author | Philippe Vinchon <p.vinchon@gmail.com> | 2020-02-24 02:14:53 +0300 |
---|---|---|
committer | Andreas Deininger <andreas@deininger.net> | 2022-03-02 22:53:52 +0300 |
commit | 2736df1a57c003d9f7e46ac90a1ab05b5187ba3d (patch) | |
tree | f9300921efcea9404cc15cabba7d43333f5a7f2a | |
parent | 32d39a31c779bdced0941f21b3faf13ea13be5c5 (diff) |
Update baseof.html
Don't publish analytics events during development
Solution from https://discourse.gohugo.io/t/how-to-exclude-google-analytics-when-running-under-hugo-local-server/6092/34
-rw-r--r-- | layouts/_default/baseof.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 57ef293..f5fa96e 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -74,6 +74,8 @@ <script src="{{ . | relURL }}"></script> {{- end}} - {{ template "_internal/google_analytics_async.html" . }} + {{ if not .Site.IsServer }} + {{ template "_internal/google_analytics_async.html" . }} + {{ end }} </body> </html> |