分析API在提取分页结果时会给用户错误的计数 [英] Analytics API gives wrong users count when fetching paginated result
问题描述
尝试使用适用于java的GA API获取数据,如 devguide 。
尺寸:
-
ga:pagePath
-
ga:date
-
ga:country
-
ga:主机名
-
ga:userType
指标: / p>
-
ga:综合浏览量
-
ga:sessions
-
ga:users
li> -
ga:bounceRate
-
ga:pageValue
-
ga:exitRate
ga:uniquePageviews
我正在查询单个日期, max-result = 10000
。结果中有超过10k行,所以我在循环中使用 start-index
查询。
该查询的问题在于,结果数据的用户数量比会话数量多3倍。当我做一个更简单的查询( ga:users
, ga:sessions
由 ga:date
为同一日期)口粮似乎有效 - users / sessions = 0.8
会话(GA中的一个奇怪的度量)仅在会话的第一次点击即登陆页面上计算。在查看网页级数据时,如果某个网页不是着陆页,请不要惊讶地发现有多个网页浏览或用户参与了0次会话。
如果您想详细了解关于此的解释,请阅读:
http:// help .analyticsedge.com / googleanalytics / misunderstood-metrics-sessions-for-pages /
Trying to get data using GA API for java like it's described in the devguide.
Dimensions:
ga:pagePath
ga:date
ga:country
ga:hostname
ga:userType
Metrics:
ga:pageviews
ga:sessions
ga:users
ga:uniquePageviews
ga:bounceRate
ga:pageValue
ga:exitRate
I'm quering for a single date, max-result = 10000
. There are more than 10k rows in result, so I'm quering in a loop using start-index
.
The problem with that query is that in the resulting data number of users is ~3 times greater than number of sessions. When I'm making a simpler query (ga:users
, ga:sessions
broken by ga:date
for the same date) the ration seems valid -- users/sessions = 0.8
Source code is available in a repository
Any ideas on how to get valid users count with that more complex query?
Sessions (an odd metric in GA) are only counted on the first hit of the sessions i.e. the landing page. When viewing page-level data, if a page is not a landing page, do not be surprised to see 0 sessions with many pageviews or users.
If you want a detailed explanation about this, read: http://help.analyticsedge.com/googleanalytics/misunderstood-metrics-sessions-for-pages/
这篇关于分析API在提取分页结果时会给用户错误的计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!