Éric Araujo committed a0bf399

* Small readability changes

Comments (0)

Files changed (1)


             log.exception('mixpanel track event exception: event %s; properties: %s',
                           event, properties)
-    def people_track(self, distinct_id, properties, action=u'$set', ip='0'):
+    def people_track(self, distinct_id, properties, action=u'$set', ip=u'0'):
         """Create or update user in Mixpanel People.
         *distinct_id* must be a string and *properties* a dictionary.
         and that transactions must be of the form
         ``{"$time": iso_datetime, "$amount": number}``.
-        *ip* is the ip of the client, if not set the 0 value will tell to
-        mixpanel to not track the ip of the client.
-        This field is mandatory to track Country/Region/City.
+        *ip* is the IP address of the client.  The default value of '0'
+        will cause Mixpanel to store nothing; without value, the server
+        IP would be used.  This field is necessary to detect the user's
+        location.
             data = base64.b64encode(json.dumps({
                 u'$token': self.token,
                 u'$distinct_id': distinct_id,
+                u'$ip': ip,
                 action: properties,
-                '$ip': ip,
             response ='',