Skip to content

Commit

Permalink
test for analytics include first
Browse files Browse the repository at this point in the history
  • Loading branch information
luceos committed Jan 7, 2016
1 parent 727af1b commit 0b25fd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/forum/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import Page from 'flarum/components/Page';
app.initializers.add('hyn-analytics', app => {
extend(Page.prototype, 'init', function(vdom)
{
ga('send', 'pageview', {page: m.route()});
if(typeof ga != 'undefined') {
ga('send', 'pageview', {page: m.route()});
}
});
});

0 comments on commit 0b25fd7

Please sign in to comment.