У меня есть следующий рабочий код, и я хотел видеть журнал консоли для просмотра страницы для каждого настраиваемого измерения, которое у меня есть.Пользовательский размер страницы Google Analytics View
var report = new gapi.analytics.report.Data({
query: {
'ids': 'ga:XXXXXX',
'metrics': 'ga:pageviews',
'dimensions': 'ga:dimension1',
'start-date': '7daysAgo',
'end-date': 'yesterday',
}
});
// Runs the query.
report.execute();
// Specifies the callback function to be run when the query succeeds.
report.on('success', function(response) {
// Logs the entire response object.
console.log(response);
// Logs just the total pageviews.
console.log(response.totalsForAllResults['ga:pageviews']);
});
@Rob М. Спасибо за редактирование формат кода. –