Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/Producers/MixpanelEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ public function track($event, $properties = array()) {

// if no time is passed in, use the current time
if (!array_key_exists('time', $properties)) $properties['time'] = time();

$params['event'] = $event;
$params['properties'] = array_merge($this->_super_properties, $properties);


$this->enqueue($params);
}

Expand Down Expand Up @@ -120,7 +120,8 @@ public function getProperty($property) {
* @param string|int $user_id
*/
public function identify($user_id) {
$this->register("distinct_id", $user_id);
$this->register('distinct_id', $user_id);
$this->register('$user_id', $user_id);
}


Expand Down Expand Up @@ -161,4 +162,4 @@ public function createAlias($original_id, $new_id) {
function _getEndpoint() {
return $this->_options['events_endpoint'];
}
}
}
1 change: 1 addition & 0 deletions lib/Producers/MixpanelPeople.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ private function _constructPayload($distinct_id, $operation, $value, $ip = null,
$payload = array(
'$token' => $this->_token,
'$distinct_id' => $distinct_id,
'$user_id' => $distinct_id,
$operation => $value
);
if ($ip !== null) $payload['$ip'] = $ip;
Expand Down