Google Universal Analytics

This commit is contained in:
Eric Carlson
2014-01-25 17:42:25 -07:00
parent c930fe41b2
commit bc033283c6
6 changed files with 35 additions and 2 deletions
@@ -12,4 +12,11 @@ Discourse.addInitializer(function() {
window._gaq.push(['_trackPageview']);
});
}
// Also use Universal Analytics if it is present
if (typeof window.ga !== 'undefined') {
pageTracker.on('change', function() {
window.ga('send', 'pageview');
});
}
});