为什么 totals.visits 在 totals.newVisits 为 1 的行上为 NULL

Why would totals.visits be NULL on a row where totals.newVisits is 1

我是 运行 查询以提取来源、媒介、一些自定义维度、新会话 (totals.newVisits)、会话 (totals.visits) 和会话持续时间 (totals.timeOnSite).

我得到一些结果,其中有 totals.newVisits 的值,但没有 totals.visits。这怎么可能 - 新访问不应该是所有访问的子集吗?

来自 totals.visits

的定义
The value is null if there are no interaction events in the session.

Added

totals.newVisits

的定义
If this is the first visit, this value is 1, otherwise it is null.

how can there be a value for newVisits if there are no interaction events?

我会将其解释为:新用户访问了页面但没有互动

BigQuery Export schema

查看更多

您必须将这 2 个变量("totals.visits" 和 "totals.newVisits")视为指标(布尔值)

在这里,我们想知道用户在访问之前是否已经访问过该网站或者他是回头客(totals.newVisits)以及用户是否在会话期间进行了交互( totals.visits).

在那种情况下,它是 2 个自变量。

这就是 Google 指定这些变量的原因:

The value is null if there are no interaction events in the session.

If this is the first visit, this value is 1, otherwise it is null.

你必须真正遵守 Google 的变量定义:BigQuery variable dictionary