Mobile app version of vmapp.org
Login or Join
Nimeshi995

: Google Analytics API - Super simple? Google Analytics API - Too complicated? I've read about Google Analytics API but heard of others that it is a bit complicated to make it work. I use PHP.

@Nimeshi995

Posted in: #Analytics #AnalyticsApi #Google #GoogleAnalytics #Php

Google Analytics API - Too complicated?

I've read about Google Analytics API but heard of others that it is a bit complicated to make it work. I use PHP.

Copy / paste example

My question is if there is a copy / paste example anywhere on the web for getting a stats curve of the latest month, or just the numbers for that period?

Important

I need to use the new Google Analytics API version for 2012. The other one is going to die soon.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

1 Comments

Sorted by latest first Latest Oldest Best

 

@Si4351233

If you have experience programming in PHP and API's and you plan to only use the data from your own account the simplest method would be to use GAPI code.google.com/p/gapi-google-analytics-php-interface/
With this you hard code your Google email and password to gain access it does not use OAuth.

If you are building a 3rd party application that others will use to gather data. You should absolutely use OAuth so tokens are used and not passwords. For this read the OAuth guide developers.google.com/gdata/articles/oauth
Then use the Analytics data explorer to authenticate, and build a query URL. Take this URL and go to the OAuth Playground, go through the authentication process and post the URL. You will then see the XML response from Google Analytics with the data you wanted, now you can use the data however you want.

Google Analytics API v3
PHP Beta libraries from Goolge developers.google.com/analytics/devguides/reporting/core/v3/gdataLibraries

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme