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

github.com/themefisher/kross-hugo-portfolio-template.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 08:19:28 +0300
committerThemefisher Dev <themefisher.dev@gmail.com>2020-02-29 08:19:28 +0300
commit2f10f8c18bc1342b01228c3221f555dd98844ac1 (patch)
tree6662e9b415b199e3de15316a2ca97b64e6bde40c
parent8ab876b749f84188c0d7cf29b576c52fce6eb746 (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 9dca62c..da743c1 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -66,7 +66,7 @@ address = "125/A, CA Commercial Area, California, USA"
author = "Johnathan Smith"
description = "This is meta description"
# google analitycs
-google_analitycs_id = "Your ID"
+google_analitycs_id = "" # Your ID
# copyright
copyright = "Copyrighht &copy; 2020 a theme by [gethugothemes](https://gethugothemes.com)"
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 875ef2c..9694573 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -62,15 +62,19 @@
{{ range .Site.Params.plugins.js}}
<script src="{{ .URL | absURL }}"></script>
{{ end }}
+
{{ "<!-- Main Script -->" | safeHTML }}
{{ $script := resources.Get "js/script.js" | minify}}
<script src="{{ $script.Permalink }}"></script>
+
{{ "<!-- google analitycs -->" | safeHTML }}
+{{ with .Site.Params.google_analitycs_id }}
<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.google_analitycs_id }}', 'auto');
+ ga('create', '{{ . }}', 'auto');
ga('send', 'pageview');
</script>
+{{ end }} \ No newline at end of file