mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
Merge pull request #1863 from ecuk/analytics
Google Universal Analytics
This commit is contained in:
@@ -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');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user