From d6dfc1901ac12fcb3cb5cf132cfdc6ef9c8028aa Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Mon, 19 Oct 2015 13:31:03 +0200 Subject: [PATCH] Add internal Google Analytics template This commits also adds the GoogleAnalytics variable to insert the tracking code. Fixes #1424. --- content/overview/introduction.md | 2 +- content/templates/variables.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/content/overview/introduction.md b/content/overview/introduction.md index 4fb57a02d..701e24de2 100644 --- a/content/overview/introduction.md +++ b/content/overview/introduction.md @@ -127,6 +127,7 @@ Hugo boasts the following features: ### Additional Features * Integrated [Disqus](https://disqus.com/) comment support + * Integrated [Google Analytics](https://google-analytics.com/) support * Automatic [RSS](/layout/rss/) creation * Support for [Go](http://golang.org/pkg/html/template/), [Amber](https://github.com/eknkc/amber) and [Ace](http://ace.yoss.si/) HTML templates * Syntax [highlighting](/extras/highlighting/) powered by [Pygments](http://pygments.org/) @@ -183,4 +184,3 @@ as I have writing it. * [Join the Mailing List](/community/mailing-list/) * [Star us on GitHub](https://github.com/spf13/hugo) * [Discussion Forum](http://discuss.gohugo.io/) - diff --git a/content/templates/variables.md b/content/templates/variables.md index d8df44318..c8f668b55 100644 --- a/content/templates/variables.md +++ b/content/templates/variables.md @@ -127,6 +127,7 @@ Also available is `.Site` which has the following: **.Site.Author** A map of the authors as defined in the site configuration.
**.Site.LanguageCode** A string representing the language as defined in the site configuration.
**.Site.DisqusShortname** A string representing the shortname of the Disqus shortcode as defined in the site configuration.
+**.Site.GoogleAnalytics** A string representing your tracking code for Google Analytics as defined in the site configuration.
**.Site.Copyright** A string representing the copyright of your web site as defined in the site configuration.
**.Site.LastChange** A string representing the date/time of the most recent change to your site, based on the [`date` variable]({{< ref "content/front-matter.md#required-variables" >}}) in the front matter of your content pages.
**.Site.Permalinks** A string to override the default permalink format. Defined in the site configuration.