Have you ever tried getting some data out of Google Analytics with PHP? This can be complicated. We provide some tutorials how this can be done easily with the official Google Client API and PHP.
Tag Archives: oauth
Google Client API with PHP – step by step tutorial with (some) screenshots
This page describes how you can access Google data with some handy PHP code, using the official Google Client API for PHP and OAuth2. To make it short, this is not a dirty hack but provides the official way of doing this. Unfortunately the samples provided in the client library by Google might not suite you very well. This script is the foundation for the other Google client API tutorials. Continue reading
Google Client API
This page provides some code for the Google Client API (PHP version), especially with Google Apps for Business accounts. Now it is easy to access information from Google services as Google Analytics or Google Adsense with a PHP script – when interacting with a user but also without e.g. running a cron script.
Available ressources and articles
- Accessing Google data with PHP and Google Client API
- Accessing Google Adsense data with PHP
- Download sample code
Related links
- Google API Client Library for PHP: download this now, you’ll need this
- Good tutorial for accessing Google Analytics API data
- Google API console: control the access to the apis, necessary to create new applications
- Manual for Google Analytics API: background information, available api calls and parameters
- Google Analytics API explorer: try and play with the API for Google Analytics without any PHP code, nice and good for debugging and trying