Google 分析 API 错误 "Selected dimensions and metrics cannot be queried together."
Google Analytics API error "Selected dimensions and metrics cannot be queried together."
我必须一次从我的 GA 电子商务中检索尽可能多的不同指标。为此,我正在使用 google api ruby 客户端。并不断收到错误消息:
"message"=>"Selected dimensions and metrics cannot be queried together."
例如,对于这个请求:
result = client.execute(api_method: api_method.data.ga.get, parameters: {
'ids' => 'ga:95561781',
'start-date' => Date.new(2006,1,1).to_s,
'end-date' => Date.today.to_s,
'dimensions' => 'ga:source,ga:medium,ga:country,ga:transactionId,ga:affiliation,ga:productSku,ga:productName',
'metrics' => 'ga:sessions,ga:transactionRevenue,ga:transactions,ga:uniquePurchases,ga:totalValue,ga:transactionTax'
})
我如何知道我可以组合哪些请求指标和维度,哪些不可以?我怎样才能检索尽可能多的数据?
并非所有维度和指标都可以一起查询。
Selected dimensions and metrics cannot be queried together
表示您的请求包含不能混合的维度或指标。
您可以使用 Dimensions and Metrics 开发人员参考来查看哪些指标和维度可以在您的查询中一起使用
我必须一次从我的 GA 电子商务中检索尽可能多的不同指标。为此,我正在使用 google api ruby 客户端。并不断收到错误消息:
"message"=>"Selected dimensions and metrics cannot be queried together."
例如,对于这个请求:
result = client.execute(api_method: api_method.data.ga.get, parameters: {
'ids' => 'ga:95561781',
'start-date' => Date.new(2006,1,1).to_s,
'end-date' => Date.today.to_s,
'dimensions' => 'ga:source,ga:medium,ga:country,ga:transactionId,ga:affiliation,ga:productSku,ga:productName',
'metrics' => 'ga:sessions,ga:transactionRevenue,ga:transactions,ga:uniquePurchases,ga:totalValue,ga:transactionTax'
})
我如何知道我可以组合哪些请求指标和维度,哪些不可以?我怎样才能检索尽可能多的数据?
并非所有维度和指标都可以一起查询。
Selected dimensions and metrics cannot be queried together
表示您的请求包含不能混合的维度或指标。
您可以使用 Dimensions and Metrics 开发人员参考来查看哪些指标和维度可以在您的查询中一起使用