Browse Source

GA

pull/653/head
Matthew Hodgson 7 years ago
parent
commit
fc3f356dc0
  1. 1
      src/vector/index.js
  2. 11
      vector/index.html

1
src/vector/index.js

@ -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);
}
}

11
vector/index.html

@ -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…
Cancel
Save