From 67bbe0ca1241cbb0e2b765c9f9df912dc2fab548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B8bra?= Date: Mon, 12 Oct 2015 18:10:24 +0100 Subject: [PATCH] Display Cookie Disclaimer & Add Analytics Display the cookie disclaimer to visitors. Add analytics to the site unless the user has Do Not Track enabled. --- _includes/layout/base/html-head.html | 13 +++++++++++++ js/analytics.js | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 js/analytics.js diff --git a/_includes/layout/base/html-head.html b/_includes/layout/base/html-head.html index 44ca4585..9bb53676 100644 --- a/_includes/layout/base/html-head.html +++ b/_includes/layout/base/html-head.html @@ -18,3 +18,16 @@ http://opensource.org/licenses/MIT. {% if page.id != 'download' %}{% endif %} + + + diff --git a/js/analytics.js b/js/analytics.js new file mode 100644 index 00000000..39948038 --- /dev/null +++ b/js/analytics.js @@ -0,0 +1,6 @@ +(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (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','//www.google-analytics.com/analytics.js','ga'); + ga('create', 'UA-46627233-1', 'auto'); + ga('send', 'pageview');