API 添加自定义筛选器页面路径时返回不正确的 transactionsPerSession 和 transactionRevenue 数据

API returning incorrect transactionsPerSession and transactionRevenue data when a custom filter pagepath added

我正在使用 API 来显示分析数据,为此,我首先检查这个 ga-dev-tool 中的数据和参数。已经在 ga-dev-tool 中检查了两种方式。

当我尝试不使用 pagepath 时,它可以正常工作,并且我得到了 transactionsPerSession 和 transactionRevenue 的数据。 但是,当我以同样的方式尝试使用 pagepath 时,它不起作用并且为所有这 2 个值提供 00。

https://ga-dev-tools.web.app/query-explorer/

https://ga-dev-tools.web.app/request-composer/

这里我还附上了带有查询参数的结果图片:

引用自 Google 分析 Help Document

Not every metric can be combined with every dimension. Each dimension and metric has a scope: user-level, session-level, or hit-level. In most cases, it only makes sense to combine dimensions and metrics that share the same scope. For example, Sessions is a session-based metric so it can only be used with session-level dimensions like Source or City. It would not be logical to combine Sessions with a hit-level dimension like Page.

因此,将 Pagepath 与网页浏览量结合使用是有意义的,但不与交易相关指标结合使用。

如果您想从 API

获取横断面相关数据

那么你必须通过ga:landingPagePath

而不是维度过滤器ga:pagePath

如果您仍然收到不正确的 transactionsPerSession,请告诉我。