Skip to content

Commit

Permalink
Hotfix: sending too many events, closes #535
Browse files Browse the repository at this point in the history
  • Loading branch information
romanchyla committed Jul 31, 2015
1 parent cec2c6d commit 5fecb02
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ module.exports = function(grunt) {
"widgets/library_individual/views/view_library.js": 67,
"components/library_controller.js" : 66,
"widgets/wordcloud/widget.js": 79,
"components/analytics.js": 72
"components/analytics.js": 71
}
}
},
Expand Down
1 change: 0 additions & 1 deletion src/js/components/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ define([

// Immediately add a pageview event to the queue.
window[gaName]("create", config.googleTrackingCode, config.googleTrackingOptions);
window[gaName]("send", "pageview");

// Asynchronously load Google Analytics, letting it take over our `window[gaName]`
// object after it loads. This allows us to add events to `window[gaName]` even
Expand Down
8 changes: 0 additions & 8 deletions src/js/wraps/discovery_mediator.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,21 +367,13 @@ define([
activate: function() {
FeedbackMediator.prototype.activate.apply(this, arguments);
this.pubsub.subscribe(this.pubSubKey, this.pubsub.INVITING_REQUEST, _.bind(this.onNewCycle, this));
this.pubsub.subscribe(this.pubSubKey, this.pubsub.ARIA_ANNOUNCEMENT, _.bind(this.onPageChange, this));
this.pubsub.subscribe(this.pubSubKey, this.pubsub.APP_EXIT, _.bind(this.onAppExit, this));
},

onNewCycle: function() {
this.reset();
},

onPageChange: function(msg) {
msg = msg.replace('Switching to: ', '');
analytics('send', 'pageview', {
page: msg
});
},

onAppExit: function(data) {
console.log('App exit requested to: ' + data);
//TODO:rca - save the application history and persist it
Expand Down

0 comments on commit 5fecb02

Please sign in to comment.