【问题标题】:Exclude "Total" row in Google AdWords performance report在 Google AdWords 效果报告中排除“总计”行
【发布时间】:2012-12-19 19:58:22
【问题描述】:

我正在使用适用于 Google AdWords API v201209 的 .NET 客户端库下载广告效果报告(CSV 格式)。

我下载的每份报告中的最后一行数据是一个汇总行。示例如下:

Total, --, --, --, --, --, --, --, --, --,2.6, --, --, --,516,13,16

我不需要汇总数据。目前,我不得不编写代码手动删除它或处理在解析过程中跳过这一行。

有没有办法将此行排除在下载的报告中?

【问题讨论】:

    标签: google-ads-api


    【解决方案1】:

    对于使用 googleads-php-lib 的 php 用户:

    $reportUtils = new ReportUtils();
    $report = $reportUtils->DownloadReport($reportDefinition, null, $user, array('skipReportSummary'=>true));
    

    【讨论】:

      【解决方案2】:

      恐怕目前不可能。我通常在每行的开头请求一个数字字段,这样我就可以过滤掉我不想要的行;这也适用于无法删除的标题行。

      【讨论】:

      • 谢谢伊万。您能否通过在行的开头请求一个数字字段来详细说明过滤掉您不想要的行?我明白你的意思,但我不明白它与过滤掉聚合行有什么关系。
      • 目前,这可以通过设置HTTP header来实现。
      【解决方案3】:

      我使用的是 201509 版本。您可以在 report_downloader 参数中隐藏总计以及报表标题和列标题

      report_downloader.DownloadReport(
      report, outputfile, 
      skip_report_header=True,
      skip_column_header=False,
      skip_report_summary=True, 
      include_zero_impressions=False)
      

      【讨论】:

        【解决方案4】:

        截至目前,您可以设置HTTP header

        skipReportSummary: true|false | If true, report output 
                                        will not include a summary 
                                        row containing the report 
                                        totals. If false or not  
                                        specified, report output
                                        will include the summary row.
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2013-07-09
          • 1970-01-01
          • 1970-01-01
          • 2019-05-08
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多