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

时间:2019-03-06 11:36:07

标签: api google-api real-time google-analytics-api

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?

1 个答案:

答案 0 :(得分:2)

  

如何在我的应用程序中实时显示来自Google Analytics(分析)API的数据

你真的不能。

Google analytics api对所有分析数据的处理时间为24 -48小时。这意味着必须先处理发送到Google Analytics(分析)的数据,然后才能在网站或API中看到它们。在这段时间内,您可能会看到一些数据,但是它们不会准确或稳定。

google analytics real-time api也是您的选择。但是,此api中可用的数据非常有限。它可能仅限于可以快速处理的数据。可用数据大约在最后五分钟。

您还应该注意quota。每天每个视图最多可以向Google Analytics(分析)API发出10000个请求。如果您想实时将这些数据加载到应用程序中,则会很快用完配额。