如何在Bigquery中获取唯一页面浏览量的Google Analytics(分析)定义 [英] How to get the Google Analytics definition of unique page views in Bigquery
问题描述
https://support.google.com/analytics/answer/1257084?hl = zh-CN#pageviews_vs_unique_views
我正在尝试计算Google Analytics(分析)在其界面上每天的唯一身份网页浏览量之和 如何使用bigquery获得等效结果?
I'm trying to calculate the sum of unique page views per day which Google analytics has on its interface How do I get the equivalent using bigquery?
推荐答案
有两种使用方法:
1)如原始链接文档所述,它是将完整的访问者用户ID和他们不同的会话ID:visitId合并在一起并进行计数的方法.
1) One is as the original linked documentation says, to combine full visitor user id, and their different session id: visitId, and count those.
SELECT
EXACT_COUNT_DISTINCT(combinedVisitorId)
FROM (
SELECT
CONCAT(fullVisitorId,string(VisitId)) AS combinedVisitorId
FROM
[google.com:analytics-bigquery:LondonCycleHelmet.ga_sessions_20130910]
WHERE
hits.type='PAGE' )
2)另一个只是计数不同的fullVisitorIds
2) The other is just counting distinct fullVisitorIds
SELECT
EXACT_COUNT_DISTINCT(fullVisitorId)
FROM
[google.com:analytics-bigquery:LondonCycleHelmet.ga_sessions_20130910]
WHERE
hits.type='PAGE'
如果有人想在样本公共数据集上进行尝试,可以使用教程如何添加样本数据集.
If someone wants to try out this on a sample public dataset there is a tutorial how to add the sample dataset.
这篇关于如何在Bigquery中获取唯一页面浏览量的Google Analytics(分析)定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!