How to connect a PHP backend to Google Analytics API

Sébastien picture Sébastien · Mar 9, 2013 · Viewed 11.7k times · Source

I am trying to present some basic data from our Google Analytics accounts directly on our company's backend. I am using the Google API PHP Client.

I have followed the Hello Analytics API tutorial but it leaves me with the obligation to connect from a browser. I need the info to be available from the server itself (without browser client connection) as I would like to automate the queries from within a Cron task.

Is what I want to do possible? Am I using the correct PHP API? Is there a different way to get back GA data?

Answer

mkungla picture mkungla · Mar 9, 2013

Why won't you replace your google analytics service with something like Piwik!