Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Merge pull request #14 from Kostanos/master

Added Site Speed and Pageviews per Visit metrics
latest commit 0103e7cc23
Daniel Hartmann authored
Octocat-spinner-32 Zend Added bounce rates constants
Octocat-spinner-32 .gitignore issue #9
Octocat-spinner-32 README.md Merge with changes submitted to the ZF1 svn repository
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.