Fix bug of using mixpanel module as the mixpanel client

This commit is contained in:
Petros Angelatos 2014-06-18 20:10:33 +01:00 committed by Pablo Carranza Vélez
parent e622491f37
commit 7b483e983d

View File

@ -11,7 +11,7 @@ exports.getSupervisorVersion = ->
obj = JSON.parse data
return obj.version
mixpanel.init(config.mixpanelToken)
mixpanelClient = mixpanel.init(config.mixpanelToken)
exports.mixpanelProperties = mixpanelProperties =
username: require('/boot/config.json').username
@ -20,4 +20,4 @@ exports.mixpanelTrack = (event, properties={}) ->
# Mutation is bad, and it should feel bad
properties = _.assign(_.cloneDeep(properties), mixpanelProperties)
mixpanel.track(event, properties)
mixpanelClient.track(event, properties)