1

我想通过他们的 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);
4

1 回答 1

2

查看当您单击用户时在“探索”页面上进行的查询。

$endpoint = array('stream', 'query');

$parameters = array(
    'distinct_ids' => json_encode(array('X')),
    'from_date' => '2012-12-10', 
    'to_date' => '2012-12-12'
);

编辑:流已经死了。

于 2012-12-13T03:47:16.333 回答