add google analytics code

This commit is contained in:
Roman Shtylman
2013-11-24 18:16:10 -05:00
parent b6abd16383
commit 10e75c348c
2 changed files with 11 additions and 0 deletions

8
static/js/ga.js Normal file
View File

@@ -0,0 +1,8 @@
// google analytics
(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-574889-7', 'localtunnel.me');
ga('send', 'pageview');

View File

@@ -34,3 +34,6 @@ socket.on('close', function () {
request_counter.incrementTo(0);
user_counter.incrementTo(0);
});
// load google analytics after above starts
require('./ga');