GA
This commit is contained in:
parent
93c4fc8785
commit
fc3f356dc0
2 changed files with 12 additions and 0 deletions
|
@ -117,6 +117,7 @@ var onNewScreen = function(screen) {
|
|||
var hash = '#/' + screen;
|
||||
lastLocationHashSet = hash;
|
||||
window.location.hash = hash;
|
||||
if (ga) ga('send', 'pageview', window.location.pathname + window.location.search + window.location.hash);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,5 +48,16 @@
|
|||
<source src="media/busy.ogg" type="audio/ogg" />
|
||||
<source src="media/busy.mp3" type="audio/mpeg" />
|
||||
</audio>
|
||||
<script>
|
||||
if (window.location.host === 'www.vector.im' || window.location.host === 'vector.im') {
|
||||
(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-54779209-2', 'auto');
|
||||
ga('send', 'pageview', window.location.pathname + window.location.search + window.location.hash);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue