我们如何使用API​​访问特定的Google Analytics帐户数据? [英] How can we access specific Google Analytics account data using API?

查看:121
本文介绍了我们如何使用API​​访问特定的Google Analytics帐户数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个Web应用程序,允许客户创建和展示产品。我们希望向我们的客户提供我们的Google Analytics帐户中有关其产品管理面板中的指标。



遗憾的是,GA API文档没有阐明这个怎么做;所有示例均基于OAuth 2.0身份验证,以便访问用户 GA数据而不是站点帐户。



有没有访问我们有权访问的帐户的Google Analytics数据的方式,但Web应用程序的用户没有?我怀疑答案是否,但如果有的话,我们可以通过技术手段实现这一目标? b

有没有方法可以访问我们有权访问的帐户的Google Analytics数据,但Web应用程序的用户没有?



是的,你可以使用刷新令牌。将刷新令牌存储在数据库或安全配置文件中,然后使用它显示其仪表板上的客户端统计信息。


We're developing a web application that allows clients to create and display products. We'd like to provide our clients with metrics from our Google Analytics account regarding their products in their administration panel.

Unfortunately, the GA API documentation does not shed any light on how to do this; all the example are based around OAuth 2.0 authentication in order to gain access to a users GA data instead of the site account.

Is there a way to access Google Analytics data for an account we have access to but the user of the web application does not? I suspect the answer is "no", but if so is there a way we can technically achieve this?

解决方案

Is there a way to access Google Analytics data for an account we have access to but the user of the web application does not?

Yes, you can use a refresh token. Store the refresh token in a db or secure config file, then use it to show the client stats on their dashboard.

这篇关于我们如何使用API​​访问特定的Google Analytics帐户数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆