summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_config.yml.example8
-rw-r--r--_site_build/_includes/google_analytics.html6
-rw-r--r--_site_build/_layouts/default.html3
3 files changed, 17 insertions, 0 deletions
diff --git a/_config.yml.example b/_config.yml.example
index 89bd20f..75621c6 100644
--- a/_config.yml.example
+++ b/_config.yml.example
@@ -4,23 +4,31 @@
# Appears in the <title> and <header> elements within the site.
title:
+
# Optional. Appears in the site's main <header> element.
#subtitle:
+
# Used in various places where the author of the site needs to appear.
# For example, the copyright notice.
author:
# Optional information that appears in the 'Contact' sidebar.
# Mainly used to generate URLs to various social sites.
+
# email address of the site author.
#email:
+
# Twitter name minus the @ character.
#twitter:
+
# Git hub name.
#github:
+
# Controls the number of recent posts shown on the main index page.
max_recent_posts: 10
+# Optional Google analytics.
+#google_ua:
# ***************************
# JEKYLL CONFIG
diff --git a/_site_build/_includes/google_analytics.html b/_site_build/_includes/google_analytics.html
new file mode 100644
index 0000000..1af92a9
--- /dev/null
+++ b/_site_build/_includes/google_analytics.html
@@ -0,0 +1,6 @@
+<script>
+ window._gaq = [['_setAccount','{{ site.google_ua }}'],['_trackPageview'],['_trackPageLoadTime']];
+ Modernizr.load({
+ load: ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js'
+ });
+</script>
diff --git a/_site_build/_layouts/default.html b/_site_build/_layouts/default.html
index b27e119..4eaed35 100644
--- a/_site_build/_layouts/default.html
+++ b/_site_build/_layouts/default.html
@@ -28,4 +28,7 @@
</div>
</div>
</body>
+{% if site.google_ua %}
+ {% include google_analytics.html %}
+{% endif %}
</html>