Skip to content

Commit 95a1872

Browse files
tfnicomoy
authored andcommitted
add google analytics
See issue git#57 We want to be able to track the popularity of the Git Rev News. Hence, adding some sort of tracking would be valuable and motivational. Perhaps some people don't like the notion of Google tracking traffic, but it is currently the de-facto way of measuring internet traffic, and it requires no server-side modification, which would otherwise be difficult on GitHub Pages/Jekyll. The initial tracking is made to my own Google Analytics account, but once it works I'll try to find out how it can be shared with other Git Rev News editors.
1 parent 139500a commit 95a1872

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: _layouts/default.html

+12
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,17 @@
2828

2929
<div id="menuLinkBar"><a href="#navbar">Menu</a></div>
3030
</div>
31+
<!-- Google Analytics snippet: -->
32+
<script>
33+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
34+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new
35+
Date();a=s.createElement(o),
36+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
37+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
38+
39+
ga('create', 'UA-68655198-1', 'auto');
40+
ga('send', 'pageview');
41+
42+
</script>
3143
</body>
3244
</html>

0 commit comments

Comments
 (0)