diff --git a/app/controllers/home-pro.js b/app/controllers/home-pro.js index 99253200..ced7ed46 100644 --- a/app/controllers/home-pro.js +++ b/app/controllers/home-pro.js @@ -1,10 +1,13 @@ import Ember from 'ember'; +import config from 'travis/config/environment'; export default Ember.Controller.extend({ actions: { gaCta(location) { - _gaq.push(['_trackPageview', '/virtual/signup?' + location]); - return this.auth.signIn(); + if(config.gaCode) { + _gaq.push(['_trackPageview', '/virtual/signup?' + location]); + } + this.auth.signIn(); } } }); diff --git a/app/controllers/plans.js b/app/controllers/plans.js index 99253200..9edb0cd0 100644 --- a/app/controllers/plans.js +++ b/app/controllers/plans.js @@ -3,8 +3,10 @@ import Ember from 'ember'; export default Ember.Controller.extend({ actions: { gaCta(location) { - _gaq.push(['_trackPageview', '/virtual/signup?' + location]); - return this.auth.signIn(); + if(config.gaCode) { + _gaq.push(['_trackPageview', '/virtual/signup?' + location]); + } + this.auth.signIn(); } } }); diff --git a/app/router.js b/app/router.js index f3dc6022..0e30630b 100644 --- a/app/router.js +++ b/app/router.js @@ -33,7 +33,7 @@ var Router = Ember.Router.extend({ didTransition() { this._super.apply(this, arguments); if (config.gaCode) { - return _gaq.push(['_trackPageview', location.pathname]); + _gaq.push(['_trackPageview', location.pathname]); } } });