google-analytics - 在 BigQuery 中但在 Google Analytics 中没有包含小时-分钟组合的综合浏览量条目的原因是什么?
问题描述
我正在尝试查询 BigQuery 中特定页面的浏览量(使用 count(p.page.pagePath)),但 BigQuery 中的浏览量比 GA 中的浏览量更多。
在比较特定日期(10 月 10 日)的特定页面(页面标题 = Moteurs - Le Soir Plus)的小时-分钟组合时,我在 BigQuery 中获得了 GA 中不存在的小时-分钟组合。
这怎么可能?GA 是否不记录 BigQuery 所做的某些综合浏览量?
这是我使用的查询:
#standardSQL
CREATE TEMP FUNCTION
customDimensionByIndex(indx INT64,
arr ARRAY<STRUCT<index INT64,
value STRING>>) AS ( (
SELECT
x.value
FROM
UNNEST(arr) x
WHERE
indx=x.index) );
SELECT distinct
p.page.pageTitle,
date,
p.hour,
p.minute,
count(p.page.pagepath) as Pageviews
FROM
`ga-ls-sw-233509.186661177.ga_sessions_*` AS st,
UNNEST(hits) AS P
WHERE
_TABLE_SUFFIX = FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY))
AND p.page.pageTitle = 'Moteurs - Le Soir Plus'
Group by
p.page.pageTitle,
date,
p.hour,
P.minute
ORDER BY
p.hour DESC
以下是 10 月 10 日的两个输出(BQ 和 GA):
BQ:
Row page Title date hour minute Page views
1 Moteurs - Le Soir Plus 20191010 16 13 1
2 Moteurs - Le Soir Plus 20191010 16 14 1
3 Moteurs - Le Soir Plus 20191010 16 16 1
4 Moteurs - Le Soir Plus 20191010 14 29 1
5 Moteurs - Le Soir Plus 20191010 14 32 1
6 Moteurs - Le Soir Plus 20191010 11 19 1
7 Moteurs - Le Soir Plus 20191010 11 20 1
8 Moteurs - Le Soir Plus 20191010 9 17 1
9 Moteurs - Le Soir Plus 20191010 9 24 1
10 Moteurs - Le Soir Plus 20191010 8 18 1
11 Moteurs - Le Soir Plus 20191010 8 23 1
12 Moteurs - Le Soir Plus 20191010 8 24 1
13 Moteurs - Le Soir Plus 20191010 8 29 1
14 Moteurs - Le Soir Plus 20191010 8 30 1
GA:
Page Title Date Hour Minute Page views
1. Moteurs - Le Soir Plus 20191010 16 13 1
2. Moteurs - Le Soir Plus 20191010 16 14 1
3. Moteurs - Le Soir Plus 20191010 14 29 1
4. Moteurs - Le Soir Plus 20191010 11 19 1
5. Moteurs - Le Soir Plus 20191010 09 17 1
6. Moteurs - Le Soir Plus 20191010 08 18 1
7. Moteurs - Le Soir Plus 20191010 08 23 1
8. Moteurs - Le Soir Plus 20191010 08 29 1
前任。时分组合 16h16 存在于 BQ 但不存在于 GA 中。
解决方案
据我所知,您计算的是hits而不是 pageviews。确保P.type='PAGE'
在WHERE
条款
推荐阅读
- node.js - NodeJs异步等待在for循环中没有正确等待
- html - 缩小/放大时,为什么我的 div 周围会出现一条奇怪的线?
- java - 将“年份”字段的两位数日期转换错误
- typo3 - 如何为页面实现 TYPO3 9.5 RSS 提要
- lodash - 为什么 orderBy 数字排序无法正常工作?
- bash - 如何使用 Bash 或 shell 脚本在 xmgrace 中绘制线
- python - 如何通过 ID 而不是索引位置选择项目
- javascript - 当值设置为 2 位小数时,toLocaleString 不起作用
- oracle - 如何找到 ORACLE 包中的过程的最后一个 DDL?
- android - 在键盘打开时将项目添加到 RecyclerView 时向下滚动