我正在使用Google Analytics Api来显示数据。但我的自定义维度数据将显示标题为
但是我希望将表头看作SchoolName或其他东西而不是Custom Dimension 3。
gapi.analytics.auth.authorize({ 'serverAuth': { 'access_token': token } });
var dataChart = new gapi.analytics.googleCharts.DataChart({
query: {
'ids': 'ga:111090746',
metrics: 'ga:totalEvents',
dimensions: dimension,
'start-date': '30daysAgo',
'end-date': 'yesterday',
'filters': 'ga:eventAction==' + filter,
'max-results': maxSize,
output: 'dataTable',
'totalResults': 'integer',
},
chart: {
container: 'declare-career-container',
type: 'TABLE',
options: {
showRowNumber: true,
page: 'enable',
pageSize: '10',
sortColumn: 0,
sortAscending: false,
'width': 650,
'height': 400,
'headerRow': 'header',
}
}
});
dataChart.on('success', function (response) {
var lbl = document.getElementById('totalCount');
lbl.textContent = response.response.totalResults;
});
dataChart.execute();
我怎样才能实现这个目标?
答案 0 :(得分:0)
您需要在Google Analytics(分析)帐户中添加用户定义的列