diff --git a/services/web/app/coffee/Features/Analytics/AnalyticsManager.coffee b/services/web/app/coffee/Features/Analytics/AnalyticsManager.coffee index 12e5b68c84..119b7c70b4 100644 --- a/services/web/app/coffee/Features/Analytics/AnalyticsManager.coffee +++ b/services/web/app/coffee/Features/Analytics/AnalyticsManager.coffee @@ -49,7 +49,7 @@ module.exports = timeout:1000 url: "/user/#{user_id}/event/last_occurnace" makeRequest opts, (err, response, body)-> - if err? + if err? console.log response, opts logger.err {user_id, err}, "error getting last occurance of event" return callback err diff --git a/services/web/public/coffee/main/event.coffee b/services/web/public/coffee/main/event.coffee index b788057b77..d71f865620 100644 --- a/services/web/public/coffee/main/event.coffee +++ b/services/web/public/coffee/main/event.coffee @@ -8,15 +8,15 @@ define [ ga('send', 'event', category, action) event_name = "#{action}-#{category}" Intercom?("trackEvent", event_name, attributes) - + App.factory "event_tracking", ($http, localStorage) -> - _getEventCache = () -> + _getEventCache = () -> eventCache = localStorage CACHE_KEY # Initialize as an empy object if the event cache is still empty. if !eventCache? eventCache = {} - localStorage CACHE_KEY, eventCache + localStorage CACHE_KEY, eventCache return eventCache @@ -45,7 +45,7 @@ define [ } sendMBSampled: (key, segmentation) -> - @sendMB key, segmentation if Math.random() < .01 + @sendMB key, segmentation if Math.random() < .01 sendMBOnce: (key, segmentation) -> if ! _eventInCache(key)