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

github.com/calintat/minimal.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/header.html')
-rw-r--r--layouts/partials/header.html13
1 files changed, 12 insertions, 1 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index a7fe630..a28a851 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -10,7 +10,18 @@
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
- {{ partial "head-close" . }}
+
+ {{ if .Site.GoogleAnalytics }}
+ <!-- Global Site Tag (gtag.js) - Google Analytics -->
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.GoogleAnalytics }}"></script>
+ <script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments)};
+ gtag('js', new Date());
+
+ gtag('config', '{{ .Site.GoogleAnalytics }}');
+ </script>
+ {{ end }}
</head>
<body>