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

github.com/themefisher/Hargo-hugo-ecommerce-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThemefisher Dev <themefisher.dev@gmail.com>2020-02-29 06:54:21 +0300
committerThemefisher Dev <themefisher.dev@gmail.com>2020-02-29 06:54:21 +0300
commitb7e662bb2853063c4eb3cf3e6137e99878dcebe2 (patch)
treede5063d586750a0f61c149965b9edacbea678f78
parentde27cfcea378077461683ef5d3017fa2678f9f8f (diff)
modified google analytics
-rw-r--r--exampleSite/config.toml2
-rw-r--r--layouts/partials/footer.html6
2 files changed, 6 insertions, 2 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 14dd173..f03222e 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -92,7 +92,7 @@ mapLatitude = "51.5223477"
mapLongitude = "-0.1622023"
mapMarker = "images/marker.png"
# Google Analitycs
-googleAnalitycsID = "Your ID"
+googleAnalitycsID = "" # Your ID
# Contact Information
mobile = "0124857985320"
email = "demo@email.com"
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index e6fd154..26a81e6 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -68,6 +68,9 @@
{{ "<!-- Main Script -->" | safeHTML }}
{{ $script := resources.Get "js/script.js" | minify}}
<script src="{{ $script.Permalink }}"></script>
+
+
+{{ with .Site.Params.googleAnalitycsID }}
{{ "<!-- google analitycs -->" | safeHTML }}
<script>
(function (i, s, o, g, r, a, m) {
@@ -81,9 +84,10 @@
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('create', '{{ . }}', 'auto');
ga('send', 'pageview');
</script>
+{{ end }}
<!-- product rating -->
{{ if .Site.Params.rating.enable }}