2

I have a website, and want to use the Google Analytics API to give me data that only includes visits with a specific goal completion (say goal 2). I'm trying to use the ga:goal(2)Completions metric in a segment to get this data like this:

segment=dynamic::ga:goal(2)Completions!=0

However, whenever I try this in the Query Explorer I'm told this is an invalid segment value. I don't see goal(n)Completions as a disallowed metric for use in segments in the documentation (https://developers.google.com/analytics/devguides/reporting/core/v3/reference#segment), so what's the problem here? Is there a different way to get this data segment?

4

2 回答 2

1

这是因为

  • 你不应该使用“segment=”
  • (n) 值应不带括号。

ids= ga:XXXXXXXX

开始日期= 2012-01-01

结束日期= 2012-01-31

指标= ga:访问

段=动态::ga:goal2Completions!=0

我已经测试过,上面的示例应该可以正常工作。

于 2013-02-11T14:05:03.813 回答
0

如果你想做相反的使用 segment= dynamic::ga:goal2Completions==0

您可以通过运行不进行分段的查询来仔细检查它 - 以上都应该总结最新的。

干杯

于 2013-10-28T16:29:33.700 回答