WB_analytics is a PHP library which will help you fetch analytics reports from your Google account. Google announced an API some months ago but nothing happened ever since so we created this class which will be updated if the API will be published.
This data source uses web scraping. This means that Google could easily break it by making changes to the infrastructure of Google Analytics.
It is based on Felix's class which does the same think but for CakePHP.
$report = array ( 'profile' => 11040536, 'from' => '2009-01-22', 'to' => '2009-02-22', 'report' => 'Dashboard' );
echo $analytics->report ( $report );// output is XML
In the above example we're fetching the dashboard. There are other report types such as Visits, UniqueVisitors, Resolutions, content.TopContent, Keywords, ReferringSources, TrafficSources, Speeds and many others.