diff --git a/www/templates/base.tmpl b/www/templates/base.tmpl index b1e4bdc9fe..567919c06d 100644 --- a/www/templates/base.tmpl +++ b/www/templates/base.tmpl @@ -9,6 +9,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- CSS in: {{ cssdir }}--> {% include 'templates/css.tmpl' %} +{% include 'templates/google_analytics.tmpl' %} </head> <body> {% include 'templates/header.tmpl' %} diff --git a/www/templates/google_analytics.tmpl b/www/templates/google_analytics.tmpl new file mode 100644 index 0000000000..e4f91ee560 --- /dev/null +++ b/www/templates/google_analytics.tmpl @@ -0,0 +1,11 @@ +<!-- Google Analytics --> +<script> +(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-17511903-1', 'auto'); +ga('send', 'pageview'); +</script> +<!-- End Google Analytics --> diff --git a/www/templates/indexbase.tmpl b/www/templates/indexbase.tmpl index ce77503cec..c2959fb093 100644 --- a/www/templates/indexbase.tmpl +++ b/www/templates/indexbase.tmpl @@ -10,6 +10,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- CSS in: {{ cssdir }}--> {% include 'templates/css.tmpl' %} +{% include 'templates/google_analytics.tmpl' %} </head> <body> {% include 'templates/header.tmpl' %}