just depend on the ga code

This commit is contained in:
Sven Fuchs 2013-02-08 15:30:49 +01:00
parent 2e8a197933
commit fb96164db8
2 changed files with 2 additions and 3 deletions

View File

@ -3,8 +3,7 @@ require 'travis/location'
Ember.Route.reopen
enter: (router) ->
@_super(router)
if @get('isLeafRoute') && !window.location.host.match(/staging|localhost/)
_gaq.push(['_trackPageview', @absoluteRoute(router)])
_gaq.push(['_trackPageview', @absoluteRoute(router)]) if @get('isLeafRoute') && _gaq
defaultRoute = Ember.Route.extend
route: '/'

View File

@ -107,7 +107,7 @@ Storage = Em.Object.extend
@store = app.store
$ => app.initialize()
setupGoogleAnalytics()
setupGoogleAnalytics() if Travis.config.ga_code
require 'ext/i18n'
require 'travis/ajax'