我想通过他们的 PHP API 在 Mixpanel 上获取特定用户的数据。例如,我想知道用户 X 做了多少次 AppLauch 事件?
$mp = new Mixpanel($api_key,$api_secret);
//Create single point array with API endpoint
$endpoint = array('segmentation');
//Create array of properties to send
$parameters = array(
'event' => 'AppLaunch',
'user_id' =>'X',
'from_date' => '2012-12-10',
'to_date' => '2012-12-12'
);
//Make the request
$data = $mp->request($endpoint, $parameters);
print_r($data);