Google Analytics API TotalEvents查询 [英] Google Analytics API TotalEvents query
问题描述
我正在尝试获取某项捐赠活动的总数,但是我得到的数字要比我在GA网站上看到的数字大很多(大10到20倍),我在做什么错了? (api v3)
I'm trying to get a total count for a give event,however I get a number much bigger(10-20 times bigger), than I see on the GA website, what am I doing wrong? (api v3)
这是细分
指标:
ga:totalEvents
段:
dynamic::ga:eventCategory==mycategory;ga:eventAction==myaction;ga:eventLabel==mylabel
请注意,我在查询浏览器中也得到了错误的结果.
note that I get wrong results with the query explorer as well.
推荐答案
您正在使用细分而不是过滤器.
You are using a segment instead of a filter.
段是基于会话的,因此如果它符合您的规范,它将包含会话中的所有事件.因此,从本质上讲,如果我触发了您想要的事件以及其他事件,它们将全部包含在总事件字段中.
Segments are session based so it will include all events in a session if it matches you specification. So essentially if I triggered the event you want plus other events they will all be included in the total events field.
您需要做的是删除该段并添加一个过滤器,该过滤器将仅包含您请求的数据.
What you need to do Is remove the segment and add a filter, the filter will include only the data you request.
希望有帮助
这篇关于Google Analytics API TotalEvents查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!