feat: Google Analytics support (#135)

* Added Google Analytics feature

* style: load GA script before head/custom

* style(config): googleAnalytics field empty by default

Co-authored-by: Jimmy Cai <github@jimmycai.com>
This commit is contained in:
Julian Alarcon 2021-02-11 12:56:39 -05:00 committed by GitHub
parent a8718592df
commit 83e3a4e8e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -7,6 +7,9 @@ title: Example Site
# Change it to your Disqus shortname before using
disqusShortname: hugo-theme-stack
# GA Tracking ID
googleAnalytics:
# Theme i18n support
# Available values: en, fr, id, ja, ko, pt-br, zh-cn
DefaultContentLanguage: en

View File

@ -21,4 +21,5 @@
<link rel="shortcut icon" href="{{ . }}" />
{{ end }}
{{- template "_internal/google_analytics_async.html" . -}}
{{- partial "head/custom.html" . -}}