0

例如用於不同的網站谷歌Analytics(分析)API:如何從谷歌Analytics API的數據不同的網站

我有67個網站,並有記錄在谷歌分析。

其實我想要單個網站訪問量最大的前10個鏈接,訪問次數,訪問次數以及訪問總數和訪問次數。

使用GAPI它並沒有顯示特定網站

$ga = new gapi('[email protected]', 'xxxxxxx'); 
    $dimensions = array('browser','source','region'); 
    $metrics = array('pageViews','visitors','visits'); 
    $ga->requestReportData('12312123', $dimensions, $metrics, '-visits'); 
    $gaResults = $ga->getResults(); 

,如果你有谷歌分析與Zend framework2的答案,你可以回答這個問題

+0

-1數據的最後一行... http://stackoverflow.com/a/16046559/949273 – tasmaniski

回答

0

我找到解決方案我自己:

這cantain你的網站

帳戶細節:

$ga = new gapi('[email protected]', 'xxxxxxx'); 

給予維和指標,您可以從谷歌分析要

$dimensions = array('browser','source','region'); 
$metrics = array('pageViews','visitors','visits'); 

在谷歌分析每個網站有一個PROFILE_ID:123456 您可以通過登錄中看到它到您的帳戶。

$ga->requestReportData(profile_id, $dimensions, $metrics, '-visits'); 

你會retrive特定網站

相關問題