Browse Source

Use Google Analytics

Track3 6 years ago
parent
commit
6febefee5e
2 changed files with 3 additions and 1 deletions
  1. 1 0
      config.toml
  2. 2 1
      layouts/_default/baseof.html

+ 1 - 0
config.toml

@@ -8,6 +8,7 @@ pygmentsUseClasses  = true
 hasCJKLanguage = true
 rssLimit = 10
 copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
+googleAnalytics = "UA-125057333-1"
 
 [author]
   name = "Track3"

+ 2 - 1
layouts/_default/baseof.html

@@ -34,6 +34,7 @@
 	{{ block "footer" . -}}{{ end }}
 	{{ $script := resources.Get "js/main.js" | minify | fingerprint -}}
 	<script src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }}></script>
+	{{ template "_internal/google_analytics_async.html" . }}
 </body>
 
-</html>
+</html>