google是否支持在其API中选择和过滤自定义维度?每当我尝试使用ga:dimension1
进行查询时,它都会出错客户代码:
//analytics.js include on the previous line
ga('create', 'UA-50XXXXXX-1', 'domain.com');
ga('set', 'dimension1', 'var1' );
ga('set', 'dimension2', 'var2' );
ga('set', 'dimension3', 'var3' );
ga('require', 'displayfeatures');
ga('send', 'pageview');
我转到https://ga-dev-tools.appspot.com/explorer/并输入我的帐户信息,ga:网页浏览量作为指标,ga:维度1作为维度,它将此作为查询URI:
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3AXXXXXXXX&dimensions=ga%3Adimension1&metrics=ga%3Apageviews&start-date=2015-02-20&end-date=2015-02-26&max-results=50
当我运行查询URI时,它返回:
Ack! There was an error!
400 : Unknown dimension(s): ga:dimension1
我是否需要在帐户中启用某些功能?我是否需要回到ga.js和自定义变量
答案 0 :(得分:3)
最可能的解释是,您尚未在Google Analytics中的属性上启用自定义维度。
本文应解释您如何不确定:
https://support.google.com/analytics/answer/2709829