Polymer 1.0 google-analytics-query:没有任何东西出现

时间:2022-01-16 15:15:39

I am trying to develop a dashboard for my client where I have to use several google web components. My first approach is to show up a simple analytic query for which I am using this:

我正在尝试为我的客户开发一个仪表板,我必须使用多个Google Web组件。我的第一种方法是显示一个简单的分析查询,我正在使用它:

<google-analytics-query
  ids="ga:xxxxxxxx"
  metrics="ga:sessions"
  dimensions="ga:country"
  sort="-ga:sessions"
  start-date="2015-10-01"
  end-date="2015-10-31"
  max-results="5">
</google-analytics-query>

But nothing is visible! I am referring to https://elements.polymer-project.org/elements/google-analytics?active=google-analytics-query

但没有什么是可见的!我指的是https://elements.polymer-project.org/elements/google-analytics?active=google-analytics-query

What's going wrong?

出了什么问题?

UPDATE I also tried the following code to render google-analytics-chart output ended up with a big white box.

更新我还尝试了以下代码来渲染谷歌分析图表输出结束了一个大的白色框。

<google-analytics-chart
  type="area"
  ids="ga:88814676"
  metrics="ga:sessions"
  dimensions="ga:date"
  start-date="2015-10-01"
  end-date="2015-10-31"
  max-results="5">
</google-analytics-chart>

1 个解决方案

#1


0  

This question as also asked on the Github repo for the <google-analytics> element. You can see the answer there: https://github.com/GoogleWebComponents/google-analytics/issues/29#issuecomment-157367824

这个问题也在Github回购中询问了 元素。你可以在那里看到答案:https://github.com/GoogleWebComponents/google-analytics/issues/29#issuecomment-157367824

The gist of the problem: using the <google-analytics-chart> element require authentication via the <google-signin> element in order to work.

问题的要点:使用 元素需要通过 元素进行身份验证才能运行。

#1


0  

This question as also asked on the Github repo for the <google-analytics> element. You can see the answer there: https://github.com/GoogleWebComponents/google-analytics/issues/29#issuecomment-157367824

这个问题也在Github回购中询问了 元素。你可以在那里看到答案:https://github.com/GoogleWebComponents/google-analytics/issues/29#issuecomment-157367824

The gist of the problem: using the <google-analytics-chart> element require authentication via the <google-signin> element in order to work.

问题的要点:使用 元素需要通过 元素进行身份验证才能运行。