谷歌分析指标和维度API问题
我正在尝试使用谷歌分析 API 检索一些数据来构建一个图表,显示当月每天的访问者数量。
然而,我几乎完全迷失了指标和维度的想法。
如果我使用 ga:visitors 指标 - 那只会给我一个访问者总数 - 对吗? 我如何在一个月内每天检索访客?
任何建议将不胜感激。
谢谢!
I'm trying to use google analytics API to retrieve some data to build a chart that displays number of visitor per day for current month.
However I'm almost completely lost with metrics and dimensions idea.
if I use ga:visitors metrics - that would only give me a total number of visitors - right?
How would I retrieve visitors per each day in a month?
any advice would be greatly appreciated.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我强烈建议您使用数据馈送查询资源管理器来入门:
https://ga -dev-tools.appspot.com/query-explorer/
您必须使用您的 Google 帐户登录,然后单击按钮以授予应用程序访问权限。但它有一个简单的用户界面,可以让您构建您的请求。一个很好的起始示例可能是:
这将为您提供每天的页面浏览量和访客数。日期范围。
总体思路是您正在构建一个表格。指标是您要测量的内容,维度是您对指标进行分组的依据。
I highly recommend using the Data Feed Query Explorer to get your feet wet:
https://ga-dev-tools.appspot.com/query-explorer/
You'll have to login with your Google Account and click the button to grant the application access. But it has a simple UI that lets you build your request. A good starting example might be:
This will give you pageviews and visitors per day, for every day in your date range.
The general idea is that you are building a table of sorts. Metrics are what you are measuring, and Dimensions are what you are grouping the Metrics by.