简体   繁体   English

谷歌分析嵌入API,无需谷歌登录谷歌分析

[英]google analytics embed API without google login to google analytics account

I am trying to implement 'Google Analytics' where the resulted data should be imported into my site as a separate page. 我正在尝试实施“ Google Analytics(分析)”,其中将结果数据作为单独的页面导入到我的网站中。

When I use embed API, it asks for google analytics login before displaying the analytics data in the form of charts.. etc. 当我使用embed API时,它会要求Google Analytics(分析)登录,然后以图表形式显示分析数据。等等。

How to bypass the external google login for google analytics embed api. 如何绕过外部Google登录以获取Google Analytics(分析)嵌入API。

We're using Angular JS to consume embed api. 我们正在使用Angular JS来使用embed API。

You can't do that. 你不能那样做。 The embed API requires that you have access to the data in order to view it. embed API要求您有权访问数据才能查看。

If you want to have a dashboard publicly available of your data the best course of action is to: 如果要公开显示数据仪表板,最好的做法是:

  • Query your data server side and store it in a database 查询数据服务器端并将其存储在数据库中
  • Query the database and query your database on page load and draw the charts. 查询数据库,并在页面加载时查询数据库并绘制图表。

This way you protect your google credentials doing the query server-side and also cache the data for faster retrieval when serving your pages and also to avoid hitting api limits. 这样,您可以在服务器端进行查询时保护自己的Google凭据,还可以缓存数据,以便在提供网页时更快地进行检索,还可以避免违反api限制。

Another option is to take a look at SuperProxy . 另一种选择是看一下SuperProxy Which is an AppEngine Application you can deploy and does exactly the same job I described above. 您可以部署哪个AppEngine应用程序,并完成与上述相同的工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM