diff options
author | memnoth <yisooan@gmail.com> | 2017-09-18 17:20:55 +0300 |
---|---|---|
committer | Calin Tataru <calintat@gmail.com> | 2017-09-28 23:30:33 +0300 |
commit | dc970cee92e67d7bf81259bd69b98786a4bd1799 (patch) | |
tree | c91a8112bf39a142ffe939ae89a540bede48ba0d | |
parent | 7f0559d5cc5569d0956a192535eb3a3353a9ff70 (diff) |
Update google-analytics code.
move to the <head> section.
-rw-r--r-- | layouts/partials/footer.html | 12 | ||||
-rw-r--r-- | layouts/partials/header.html | 9 |
2 files changed, 10 insertions, 11 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 0e30932..8a0706f 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -3,17 +3,7 @@ <p class="copyright text-muted">{{ .Site.Params.copyright | default "© All rights reserved. Powered by [Hugo](https://gohugo.io) and [Minimal](https://github.com/calintat/minimal)" | markdownify }}</p> </footer> - <!-- 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> - - + </body> </html> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 5db3b6b..d925d88 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -9,6 +9,15 @@ <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 }} + <!-- 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> </head> <body> |