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

github.com/xaviablaza/hugo-lodi-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pollind <polli104@mail.chapman.edu>2017-10-19 20:15:09 +0300
committerMichael Pollind <polli104@mail.chapman.edu>2017-10-19 20:15:09 +0300
commitf8f22d764a0c28709fa4e57b84c6d0ace7c9b901 (patch)
tree8c0b69763a38019fd2f7465946b260da822406b8
parent59ceaca516ef8bebe567855fcc6e30e084d8db3f (diff)
tweaked google analytics
-rw-r--r--exampleSite/config.toml2
-rw-r--r--layouts/partials/head.html9
-rw-r--r--layouts/partials/scripts.html1
3 files changed, 3 insertions, 9 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 12d5fb1..517efbb 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -2,7 +2,7 @@ baseURL = "localhost:1313"
languageCode = "en-us"
title = "My Portfolio Website"
theme = "hugo-lodi-theme"
-# googleAnalytics = "UA-XXXXXXXX-Y"
+googleAnalytics = "UA-XXXXXXXX-Y"
[params]
theme_color = "#574CDD"
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index adad0c2..5af4a1a 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -12,11 +12,4 @@
<link rel="shortcut icon" href="{{ .Site.BaseURL }}img/{{ .Site.Params.Favicon }}" type="image/x-icon">
<link rel="stylesheet" href="css/final.css">
<link rel="stylesheet" href="css/normalize.css">
-<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,700">
-{{ if isset .Site.GoogleAnalytics }}
-<script async="" src="https://www.google-analytics.com/analytics.js"></script>
-<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','https://www.google-analytics.com/analytics.js','ga');
- ga('create', '{{ .Site.GoogleAnalytics }}', 'auto');
- ga('send', 'pageview');
-</script>
-{{ end }}
+<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,700"> \ No newline at end of file
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 8e10c18..bd1edba 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -1,3 +1,4 @@
+{{ template "_internal/google_analytics.html" . }}
<script src="{{ .Site.BaseURL }}js/jquery-1.js"></script>
<script src="{{ .Site.BaseURL }}js/stickUp.js"></script>
<script src="{{ .Site.BaseURL }}js/scrollIt.js" type="text/javascript"></script>