From 85f597ed30ece3db2707b98c0ad204c3ea672993 Mon Sep 17 00:00:00 2001 From: allejo Date: Wed, 21 Dec 2016 14:29:38 -0800 Subject: [PATCH] Actually load Google Analytics --- _includes/footer.html | 6 +++++- _includes/google-analytics.html | 2 +- docs/_config.yml | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/_includes/footer.html b/_includes/footer.html index fc214ad..02e13a7 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -82,4 +82,8 @@ -{% endif %} \ No newline at end of file +{% endif %} + +{% if site.analytics.google %} + {% include google-analytics.html %} +{% endif %} diff --git a/_includes/google-analytics.html b/_includes/google-analytics.html index 8912bea..4cbb815 100644 --- a/_includes/google-analytics.html +++ b/_includes/google-analytics.html @@ -3,6 +3,6 @@ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); - ga('create', '{{ site.google_analytics }}', 'auto'); + ga('create', '{{ site.analytics.google }}', 'auto'); ga('send', 'pageview'); \ No newline at end of file diff --git a/docs/_config.yml b/docs/_config.yml index 8247e7e..e75e854 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -42,8 +42,7 @@ social: profileUrl: analytics: - account: - domain: + google: UA-123456-1 # Build settings markdown: kramdown