我正在尝试访问Google Analytics(分析)API。
如何添加仅提取以下数据的过滤器:
ga:campaign
包含“电视”
和
ga:sourceMedium
包含“ Google / CPC”
请,请参阅我当前的请求:
metrics_columns = [
{expression: 'ga:transactions'},
{expression: 'ga:adCost'}
];
dimensions_rows = [{
name: 'ga:campaign'
}];
date_filters = [{
startDate: 'today',
endDate: 'today',
}];
sort = [{
fieldName: 'ga:transactions',
sortOrder: "DESCENDING"
}];
var req = {
reportRequests: [{
viewId: viewID,
dateRanges: date_filters,
metrics: metrics_columns,
dimensions: dimensions_rows,
}],
};