Analytics
4.8K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
 
Guide Me
star_border
Reply

How to get data from Google Analytics to my Local Database?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Dear Experts,

 

Anybody have idea on how to save all the analytics data recorded in GA to my local database via PHP and MySQL.

 

Please suggest any ideas on how to implement even if it is possible in any other ways.

 

Thanks,

Bala

1 Expert replyverified_user
Marked as Best Answer.
Solution
Accepted by topic author Kristopher
November 2015

Re: How to get data from Google Analytics to my Local Database?

Rising Star
# 2
Rising Star
Hey Bala, how are things?

I think that the best way is to use Analytics API to collect the data and send to your local data base.

You can refer to this page to try to find a API, or develope one yourself:
https://developers.google.com/analytics/devguides/integrate/

Also, take a look at this query explorer tool, very interesting:
https://ga-dev-tools.appspot.com/query-explorer/

If I may, what kind of information are you trying to pull? Is it really worth saving ALL data on local database? This can be a hassle.

Hope this helps.

Cheers,
Leandro Martinez

Leandro Martinez | Basta1Click

How to get data from Google Analytics to my Local Database?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

How often google analytics updates the data ? I need to use Core and reporting APIs and save the data locally. but should I poll for the data every 10 seconds? in that case my account's limit will get expired, I have limited poll requests per day. 

If I know when the data is updated in google analytics, I can write my client code in Java accordingly.