mysqlgoogle-analyticsquery-stringgoogle-reporting-api

Google Analytics Reporting API vs Query Parameters


I am trying to build a centralized dashboard to display information from google analytics. I have researched about reporting API which helps in embedding charts directly form analytics dashboard and also on query parameters to store analytics data in local database such as MySQL. I wanted to know which would be easy to implement and which is more effective. I have more than 300 websites which are monitored on analytics through a single account, So the data is going to be huge. I t would be great if anyone could post a code snippet to access data from analytics and store it in the database. Thanks!


Solution

  • You can use the Google Analytics Reporting API v4, it is the updated version after Core Reporting API. The Query Explorer can help you to identify what data to extract.

    There is also another alternative if you want easier data import/export. This Analytics Canvas can do the job.

    For reference, see this SO post.