如何访问 Google 分析 API
How to access Google Analytics API
我正在构建一个小型 Google App Engine 应用程序,目的是从几个来源收集统计数据,包括通过 google 分析在我们的 public 网页上的页面点击率。尽管我对如何访问他们的 API 感到困惑,但我似乎无法理解 google 关于一般结构和他们的新安全规则的新开发者控制台。
快速概览:
- 我的应用程序基于 java 并托管在 GAE 中,想要访问简单的 Analytics 数据。我不确定它是一个 GAE 应用程序这一事实是否相关
- 受监控的站点未托管在 GAE 中并使用 analytics.js。
- 我自己的 google 帐户可以访问 https://www.google.com/analytics 上的统计信息。
我找到的所有有关访问 Analytics API 的文档(例如 https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/service-java) points me to https://console.developers.google.com 并在那里进行设置。问题是,只有我自己的应用程序存在于 console.developers.google.com 中,而不是受监控的应用程序。这些文档仅对 GAE 应用程序有效吗?或者可以将外部托管的应用程序以某种方式添加到控制台吗?控制台与分析的客户端相关吗?
我正在寻找的是创建 API 密钥供我的应用程序使用的方法 - 这是如何完成的?任何朝着正确方向迈出的一步都将受到赞赏。
根据 DaImTo 的评论(以及您之后发布的评论),似乎您需要的是:
"Its your own data go with a service account daimto.com/google-developer-console-service-account when its created take the service account email address add it as a user in the admin section of the Google analytics website at the ACCOUNT level it will then have access. You can use it with the core reporting api."
(只是将此作为答案发布,以防评论被丢弃)
我正在构建一个小型 Google App Engine 应用程序,目的是从几个来源收集统计数据,包括通过 google 分析在我们的 public 网页上的页面点击率。尽管我对如何访问他们的 API 感到困惑,但我似乎无法理解 google 关于一般结构和他们的新安全规则的新开发者控制台。
快速概览:
- 我的应用程序基于 java 并托管在 GAE 中,想要访问简单的 Analytics 数据。我不确定它是一个 GAE 应用程序这一事实是否相关
- 受监控的站点未托管在 GAE 中并使用 analytics.js。
- 我自己的 google 帐户可以访问 https://www.google.com/analytics 上的统计信息。
我找到的所有有关访问 Analytics API 的文档(例如 https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/service-java) points me to https://console.developers.google.com 并在那里进行设置。问题是,只有我自己的应用程序存在于 console.developers.google.com 中,而不是受监控的应用程序。这些文档仅对 GAE 应用程序有效吗?或者可以将外部托管的应用程序以某种方式添加到控制台吗?控制台与分析的客户端相关吗?
我正在寻找的是创建 API 密钥供我的应用程序使用的方法 - 这是如何完成的?任何朝着正确方向迈出的一步都将受到赞赏。
根据 DaImTo 的评论(以及您之后发布的评论),似乎您需要的是:
"Its your own data go with a service account daimto.com/google-developer-console-service-account when its created take the service account email address add it as a user in the admin section of the Google analytics website at the ACCOUNT level it will then have access. You can use it with the core reporting api."
(只是将此作为答案发布,以防评论被丢弃)