为什么此 Google Analytics 查询未通过网络 UI 抽样,而是通过 GA API 抽样?

Why is this Google Analytics query unsampled via the web UI but sampled via the GA API?

我最近尝试查询 Google Analytics API 以获得使用设备类别、来源和媒介作为维度的报告。该报告涵盖了大约四个星期的时间。尽管我能够在 UI 中构建等效的临时报告并根据 100% 的会话获得结果,但我无法让 API 给我基于任何结果的结果超过 1.3% 左右的会话。我使用的客户端是基于v3 API,但我在使用Google的v4测试工具时得到了相同的结果,所以它不是API版本的功能。

根据 Google's documentation,临时报告应该尽可能使用预先汇总的非抽样数据:

Ad-hoc reports are based on any non-standard query of Analytics data. For example, if you apply a segment or secondary dimension to a standard report, then Analytics has to issue a new, non-standard query of the data to return that information.

The new query goes first to the tables of aggregated data to see if all of the requested information is available there. If the information is not available there, then Analytics queries the complete, unfiltered set of data and computes new aggregates to satisfy the application of the segment or secondary dimension.

这显然适用于网络 UI,但不一定适用于 API。我的印象是网络 UI 进行的调用与 API 中公开的调用相同,但似乎并非如此。有人知道是否可以强制 API 查询使用我知道可用的预聚合数据集吗?

Web UI 和 API 之间采样阈值的差异确实解释了这一点。这恰好是一个 360 帐户,其抽样阈值远高于 API 允许的值(文档对确切数字谨慎,但显然它可以是 "up to 100M sessions")。在标准帐户上进行的相同测试显示 API 和网络 UI 之间的行为相同。 Google 的 GA 问题跟踪器 API 表示他们不打算将抽样阈值提高到超过 100 万个会话,即使对于 360 个帐户也是如此。