这将是我的代码。我想知道如何通过这种报告方法设置一个只导出超过0次展示的数据的规则。
function main() {
var spreadsheet = SpreadsheetApp.openByUrl("URL");
var sheet = spreadsheet.getSheetByName( "Raw Monthly Data" );
var report = AdWordsApp.report("SELECT Date, AdGroupName, Clicks, Impressions, Conversions, Cost, ConversionRate, CostPerConversion, AverageCpc " +
"FROM ADGROUP_PERFORMANCE_REPORT " + "THIS_MONTH");
report.exportToSheet(spreadsheet.getActiveSheet());
}
答案 0 :(得分:0)
您需要在where Impressions > 0
查询中应用select
条件,如下所示:
var report = AdWordsApp.report("SELECT Date, AdGroupName, Clicks, Impressions, Conversions, Cost, ConversionRate, CostPerConversion, AverageCpc " +
"FROM ADGROUP_PERFORMANCE_REPORT where Impressions > 0 " + "THIS_MONTH");
编辑:我注意到您还有另一个问题,您误认为日期前的“ DURING”一词。这也需要修复。