我们的Google Analytics'用户数量'与我们的Big Query'用户计数不匹配。'
我是否正确计算了它?
通常情况下,GA和BQ非常接近...尽管不是完全。
最近,GA vs.BQ中的用户数量是不协调的。
区别在于用户计数。
我希望有人能回答的是:
我是否至少使用正确的SQL语法来获取BQ中的答案?
这是我在BQ中运行的查询:
SELECT
WEEK(Week) AS Week,
Week AS Date_Week,
Total_Sessions,
Total_Users,
Total_Pageviews,
( Total_Time_on_Site / Total_Sessions ) AS Avg_Session_Duration,
( Total_Sessions / Total_Users ) AS Sessions_Per_User,
( Total_Pageviews / Total_Sessions ) AS Pageviews_Per_Session
FROM
(
SELECT
FORMAT_UTC_USEC(UTC_USEC_TO_WEEK (date,1)) AS Week,
COUNT(DISTINCT CONCAT(STRING(fullVisitorId), STRING(VisitID)), 1000000) AS Total_Sessions,
COUNT (DISTINCT(fullVisitorId), 1000000) AS Total_Users,
SUM(totals.pageviews) As Total_Pageviews,
SUM(totals.timeOnSite) AS Total_Time_on_Site,
FROM
(
TABLE_DATE_RANGE([zzzzzzzzz.ga_sessions_],
TIMESTAMP('2015-02-09'),
TIMESTAMP('2015-04-12'))
)
GROUP BY Week
)
GROUP BY Week, Date_Week, Total_Sessions, Total_Users, Total_Pageviews, Avg_Session_Duration, Sessions_Per_User, Pageviews_Per_Session
ORDER BY Week ASC
我们每周有超过1,000,000名用户/会议/等。
将1,000,000加入Count Distinct条款应该可以阻止对BQ的任何抽样。
我这样做是否正确?
如果是这样的话,欢迎任何关于GA如何/为何以不同方式报告的建议。
干杯。
*(统计上)显着差异从第11周开始
答案 0 :(得分:2)
Update:
We have Premium Analytics, as @Pentium10 suggested. So, I reached out to their paid support.
Now when I pull the exact same data from GA, I get this:
Looks to me like GA has now fixed the issue.
Without actually admitting there ever was one.
::shrug::
答案 1 :(得分:1)
我以前遇到过这个问题。我修复它的方法是使用COUNT(DISTINCT FULLVISITORID)来表示total_users。
答案 2 :(得分:1)
在标准SQL中使用COUNT(DISTINCT fullVisitorId)
Google Analytics(分析)显示了用户的近似值,Big Query非常精确。您可以使用Google Analytics中的非抽样报告对此进行测试 - 数字将匹配。
此外:GA使用所有可用数据来计算用户数,即使totals.visits为NULL也是如此! 相比之下,GA仅计算会话,其中totals.visits = 1!