 
     options = { previousId, userId }
     @addDefaults options
-    analytics.alias options
+    analytics?.alias options
 
 
   @group = (groupId, userId) ->


    options = { userId, name, category, properties }
    @addDefaults options
    analytics.page options


  @alias = (previousId, userId) ->


    options = { groupId, userId }
    @addDefaults options
    analytics?.group options


  @addDefaults = (opts) ->
