0
我使用Gapi.class.php從Google分析中獲取數據。如何將Google來源媒體進行分組並統計相同的推介
這裏是我的PHP代碼
$ga->requestReportData(xxxxx,array('sourceMedium','month','year'),array('sessions'), $sort_metric=array('month'), $filter=null, $start_date=$fromDate, $end_date=$toDate, $start_index=1, $max_results=10000);
我喜歡這個
[dimensions:gapiReportEntry:private] => Array
(
[sourceMedium] => l.facebook.com/referral
[month] => 06
[year] => 2016
)
[dimensions:gapiReportEntry:private] => Array
(
[sourceMedium] => mail.google.com/referral
[month] => 06
[year] => 2016
)
[dimensions:gapiReportEntry:private] => Array
(
[sourceMedium] => mbasic.facebook.com/referral
[month] => 06
[year] => 2016
)
我想知道我怎麼可以將它們分組和計數,
Example
source Count
fb = 100
google = 50
請。
你想的lilke'1.facebook.com','mail.google.com'確切來源計數或要分組到資源類LILE FB,谷歌和比計算會議? – dikesh
@dikesh,請再看看我更新的帖子。 我想要更新某個源頁面瀏覽頁面。 謝謝。 – Nay