diff options
author | digitalcraftsman <digitalcraftsman@users.noreply.github.com> | 2015-10-19 13:31:03 +0200 |
---|---|---|
committer | spf13 <steve.francia@gmail.com> | 2015-11-04 17:11:38 -0500 |
commit | 9dbb6dc50dd68117a809a86b09dd647c02d49b65 (patch) | |
tree | 79f094be62ca4adc678720e4b698135c3148f884 /hugolib | |
parent | ca55ea505a2b87fe7c89a56d9f3f6b835f68aefc (diff) |
Add internal Google Analytics template
This commits also adds the GoogleAnalytics
variable to insert the tracking code.
Fixes #1424.
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/site.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hugolib/site.go b/hugolib/site.go index 7fe9717a5..3fe0284af 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -106,6 +106,7 @@ type SiteInfo struct { Author map[string]interface{} LanguageCode string DisqusShortname string + GoogleAnalytics string Copyright string LastChange time.Time Permalinks PermalinkOverrides @@ -456,6 +457,7 @@ func (s *Site) initializeSiteInfo() { LanguageCode: viper.GetString("languagecode"), Copyright: viper.GetString("copyright"), DisqusShortname: viper.GetString("DisqusShortname"), + GoogleAnalytics: viper.GetString("GoogleAnalytics"), BuildDrafts: viper.GetBool("BuildDrafts"), canonifyURLs: viper.GetBool("CanonifyURLs"), preserveTaxonomyNames: viper.GetBool("PreserveTaxonomyNames"), |