Read new Facebook Pixel Stats

时间:2016-04-15 11:17:08

标签: php statistics facebook-marketing-api facebook-pixel

I need to create an admin panel of sorts for a client that will present him with data of conversion values over specific time intervals, for his eshop which has the New Facebook pixel installed.

Assume I've properly configured the Standard Event I want to track. The part where I'm stuck is actually reading the data via the Facebook Marketing php sdk. It is supposed to look something like that:

/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{ads-pixel-id}/stats'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */

Am I looking at the right place? Can I still get these kind of stats or is this behavior deprecated? The Facebook documentation isn't very clear on this and everywhere I look I see deprecated pages and code,

1 个答案:

答案 0 :(得分:3)

您需要添加如下聚合:

/{ads-pixel-id}/stats?aggregation=event