Merge pull request #1863 from ecuk/analytics

Google Universal Analytics
This commit is contained in:
Robin Ward
2014-01-27 12:33:17 -08:00
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');
});
}
});