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

github.com/themefisher/liva-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan <58769763+developer-evan@users.noreply.github.com>2020-11-14 06:07:55 +0300
committerGitHub <noreply@github.com>2020-11-14 06:07:55 +0300
commit43ecdf94b38372e2d5689fa36cf430ae010efea1 (patch)
tree75cbfaa4f54e53e9e48b30bef7810f47c4d7fdb7
parent22540e9a7abb11ff4e6dca42f8b3d23050defac3 (diff)
parentdeb0da923433ba51553934ea3d7f38b1e9e18f98 (diff)
Merge pull request #36 from kucw/master
Move Google Analytics settings into <head> tag
-rw-r--r--layouts/partials/footer.html16
-rw-r--r--layouts/partials/head.html17
2 files changed, 17 insertions, 16 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 8ed5ea3..2b8aa03 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -93,22 +93,6 @@
{{ "<!-- Main Script -->" | safeHTML }}
{{ $script := resources.Get "js/script.js" | minify}}
<script src="{{ $script.Permalink }}"></script>
-{{ "<!-- google analitycs -->" | safeHTML }}
-<script>
- (function (i, s, o, g, r, a, m) {
- i['GoogleAnalyticsObject'] = r;
- i[r] = i[r] || function () {
- (i[r].q = i[r].q || []).push(arguments)
- }, i[r].l = 1 * new Date();
- a = s.createElement(o),
- m = s.getElementsByTagName(o)[0];
- a.async = 1;
- a.src = g;
- m.parentNode.insertBefore(a, m)
- })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
- ga('create', '{{ .Site.Params.googleAnalitycsID }}', 'auto');
- ga('send', 'pageview');
-</script>
<!-- cookie -->
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 384d15d..9c143c4 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -21,4 +21,21 @@
<link rel="shortcut icon" href="{{ `images/favicon.png` | absURL }} " type="image/x-icon">
<link rel="icon" href="{{ `images/favicon.png` | absURL }} " type="image/x-icon">
+ {{ "<!-- google analitycs -->" | safeHTML }}
+ <script>
+ (function (i, s, o, g, r, a, m) {
+ i['GoogleAnalyticsObject'] = r;
+ i[r] = i[r] || function () {
+ (i[r].q = i[r].q || []).push(arguments)
+ }, i[r].l = 1 * new Date();
+ a = s.createElement(o),
+ m = s.getElementsByTagName(o)[0];
+ a.async = 1;
+ a.src = g;
+ m.parentNode.insertBefore(a, m)
+ })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+ ga('create', '{{ .Site.Params.googleAnalitycsID }}', 'auto');
+ ga('send', 'pageview');
+ </script>
+
</head> \ No newline at end of file