summaryrefslogtreecommitdiff
path: root/layouts/partials/header.html
diff options
context:
space:
mode:
authorFelix Tjandrawibawa <cemeng@gmail.com>2018-08-06 22:14:55 +1000
committerFelix Tjandrawibawa <cemeng@gmail.com>2018-08-06 22:14:55 +1000
commit4976196c967a3155a761d3a7ca82d3f03e515958 (patch)
treeb3fedc770097f97524375b512b974c98a75dd968 /layouts/partials/header.html
parent69da3cc3e9ed58e612ba76cb9776bda2966b9824 (diff)
Add Google analytics support
Diffstat (limited to 'layouts/partials/header.html')
-rw-r--r--layouts/partials/header.html3
1 files changed, 3 insertions, 0 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 72e1e4c..a820b4e 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -33,6 +33,9 @@
<meta name="generator" content="Hugo {{ .Hugo.Version }}">
<!-- RSS -->
<link rel="alternate" type="application/atom+xml" href="{{.Site.BaseURL}}index.xml" title="{{ .Site.Title }}">
+ {{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
+ {{ template "_internal/google_analytics_async.html" . }}
+ {{ end }}
</head>
<body class="{{if eq .Kind `page` }}single{{else}}list{{ if .IsHome }} home{{ end }}{{end}}">
<header class="header">