开发者

google analytics metrics and dimensions API question

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!


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:

  • dimensions: ga:date
  • metrics: ga:pageviews,ga:visitors

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜