Add Google Analytics

This commit is contained in:
2017-07-10 19:17:58 +01:00
parent 33c90a3c1e
commit 4f8f4d434d
3 changed files with 12 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ description: >
An attempt to gather a sensible selection of the most common usage patterns of
git into a single and concise specification.
author: Jim Myhrberg
hostname: commonflow.org
url: https://commonflow.org
current_version: 1.0.0-rc.2

10
_includes/analytics.html Normal file
View File

@@ -0,0 +1,10 @@
<script>
if (window.location.hostname == "{{ site.hostname }}") {
(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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-102330905-1', 'auto');
ga('send', 'pageview');
} else { _gaq = []; };
</script>

View File

@@ -44,5 +44,6 @@
</div>
</div>
{% js main %}
{% include analytics.html %}
</body>
</html>