如何从 GAPI 类中获取所有唯一访问者。
$ga = new gapi(ga_email,ga_password);
$dimensions = array('visitCount');
$metrics = array('visitors');
$ga->requestReportData(ga_profile_id, $dimensions,$metrics);
$gaResults = $ga->getResults();
//print_r( $gaResults);
$i=1;
foreach($gaResults as $result)
{
$total= $total+ $result->getvisitors() ;
// $result->getVisitors()
// );
// print_r($result);
}
echo $total;