Search code examples
apigoogle-apireal-timegoogle-analytics-api

How to make the data from Google analytics api be in real time in my application


I'm working with different analytic APIs (google analytics, yandex metrica, chartbeat, etc). The goal is to create the application, that the data will be shown in real time. Of course calling the same api every second is not the best solution, so could you help me to find out, how I can do this?


Solution

  • How to make the data from Google analytics api be in real time in my application

    You cant really.

    The Google analytics api has between a 24 -48 hour processing time on all analytical data. This means that the data that is sent to Google analytics must first be processed before you will see it in the website or in the API. During this time you may see some data but it wont be accurate or stable.

    The google analytics real-time api is also an option for you. However the data that is available in this api is very limited. Its probably limited to the data that can be processed quickly. THe data available is around the last five minutes.

    You should also be aware of the quota. You can make a max of 10000 requests to the google analytics API per view per day. If you want to load this data live in your application your going to quickly run out of quota.