google 同一查询中的分析 transactionId 和 pagePath 维度

google analytics transactionId and pagePath dimensions in the same query

我正在尝试为我网站上的每笔交易检索页面路径。我对任何指标都不感兴趣。我试图使用 transactionRevenue 但我收到错误

400: 'Selected dimensions and metrics cannot be queried together.'

当这两个维度在一起时,使用什么指标合适?

error 400: 'Selected dimensions and metrics cannot be queried together.'

并非所有维度和指标都可以一起查询,您选择的维度和指标不能一起查询。最好勾选dimensions and metrics explorer,看看能不能一起查询。

ga:pagePath can be combined with ga:transactionRevenue 所以这不应该是你的问题。我不确定您还有哪些其他维度和指标。

没有指标的查询

reporting api 要求您至少发送一个指标。无法在没有任何指标的情况下发出请求。

•Any request must supply at least one metric; a request cannot consist only of dimensions.

我不明白的是你说不想要任何指标 ga:transactionRevenue 是一个指标。