Google AnalyticsAPI - 在PHP中检索配置文件的细分列表

时间:2012-10-10 15:20:52

标签: php google-analytics

我在代码中有检索所有段列表的过程。

$SegmentArray = $service->management_segments->listManagementSegments();

我需要检索特定细分的细分。

如果我使用此输出:

echo "results:<br><pre>".print_r($SegmentArray,true)."</pre>";

列表(JSON)是:

Array
(
    [kind] => analytics#segments
    [username] => nomeaccount@gmail.com
    [totalResults] => 13
    [startIndex] => 1
    [itemsPerPage] => 1000
    [items] => Array
        (
            [0] => Array
                (
                    [id] => -1
                    [kind] => analytics#segment
                    [selfLink] => https://www.googleapis.com/analytics/v3/management/segments/gaid::-1
                    [segmentId] => gaid::-1
                    [name] => All Visits
                    [definition] => 
                )
    ...

如何为个人资料过滤此数据? 感谢的!

0 个答案:

没有答案