Skip to content
PHP
Find file
Latest commit 0103e7c @danielmitd Merge pull request #14 from Kostanos/master
Added Site Speed and Pageviews per Visit metrics
Failed to load latest commit information.
Zend/Gdata
.gitignore issue #9
README.md

README.md

Zend_Gdata_Analytics

An additonal Zend_GData component to query data from Analytics.

Example

$client = Zend_Gdata_ClientLogin::getHttpClient($email, $password, Zend_Gdata_Analytics::AUTH_SERVICE_NAME);
$service = new Zend_Gdata_Analytics($client);

$query = $service->newDataQuery()
  ->setProfileId($yourID)
  ->addMetric(Zend_Gdata_Analytics_DataQuery::METRIC_VISITS) 
  ->addDimension(Zend_Gdata_Analytics_DataQuery::DIMENSION_KEYWORD) 
  ->addSort(Zend_Gdata_Analytics_DataQuery::METRIC_VISITS, true)
  ->setStartDate('2006-01-01') 
  ->setEndDate('2011-07-13')
  ->setMaxResults(10000); 

$result = $service->getDataFeed($query); 

foreach($result as $row){
  /** … **/
}

More on the blog. Also take a look in the ZF1-Framework.

Something went wrong with that request. Please try again.