Google api 如何找出哪些列组合在adwords中有效

Google api 如何找出哪些列组合在adwords中有效,google-api,google-ads-api,Google Api,Google Ads Api,我正在使用adwords api生成报告。 请容忍我,因为我对这一点不太熟悉。 我使用的是v201409版本的api。 我使用getReportFields获取关键字_PERFORMANCE_report的报告列。 然后,我尝试使用这些列的子集下载报告 对于关键字\u性能\u报告,我得到错误: 无法选择设备和设备的组合 辅助单击,辅助单击上一次单击,辅助显示,辅助显示重叠单击,平均页面浏览量,平均现场时间,反弹率,反弹,单击辅助转换值,单击辅助转换值长,单击辅助转换值非货币,单击辅助转换,单击辅

我正在使用adwords api生成报告。 请容忍我,因为我对这一点不太熟悉。 我使用的是v201409版本的api。 我使用getReportFields获取关键字_PERFORMANCE_report的报告列。 然后,我尝试使用这些列的子集下载报告

对于关键字\u性能\u报告,我得到错误:

无法选择设备和设备的组合 辅助单击,辅助单击上一次单击,辅助显示,辅助显示重叠单击,平均页面浏览量,平均现场时间,反弹率,反弹,单击辅助转换值,单击辅助转换值长,单击辅助转换值非货币,单击辅助转换,单击辅助转换重叠单击转换,印象派辅助转换值,印象派辅助转换值Long,印象派辅助转换值NonMoney,印象派辅助转换,印象派辅助转换OverlastClickConversions,LastClickConversions,LastClicks,NewVisitors,Pageviews,PercentNewVisitors,VisitdDuration,Visitions, 类型:ReportDefinitionError。报告的\u字段\u名称\u无效

问题是:如何在不经过反复试验的情况下找到一组有效的列组合。。是否有任何文件可以帮助我做同样的事情

我查看了中关键字_PERFORMANCE _REPORT的列,排除了api称“不兼容”的列。我也犯了类似的错误。 谢谢

注意:如果我使用在线示例中提供的列尝试这段代码,它会正常工作并按预期下载报告。 代码是: ` 字符串[]列名称={ “转换率ManyperClicks重要性”, “转换率意义”, “ViewThroughConversionsImplementation”, “AccountCurrencyCode”, “AccountDescriptiveName”, “AccountTimeZoneId”, “AdGroupId”, “AdGroupName”, “AdGroupStatus”, “协助表达”, “AssistImpressionsOverLastClicks”, “平均CPC”, “平均CPM”, “平均浏览量”, “平均位置”, “平均现场时间”, “投标策略ID”, “BiddingStrategyName”, “投标策略类型”, “活动ID”, “活动名称”, “竞选状态”, “单击辅助转换覆盖单击转换”, “单击辅助数据转换值”, “点击”, “点击意义”, “点击类型”, “ConversionManyPerClick意义”, “转换率”, “ConversionRateManyPerClick”, “转换”, “转换重要性”, “ConversionsManyPerClick”, “ConversionTypeName”, “转换值”, “成本”, “成本转换”, “CostPerConversionManyPerClick”, “CostPerconversionManyperclick意义”, “成本转换重要性”, “成本意义”, “CpcBid”, “CpcBidSource”, “投标”, “重要意义”, “准则目标”, “Ctr”, “意义”, “CustomerDescriptiveName”, “重要性”, “日期”, “星期五”, “设备”, “ExternalCustomerId”, “最后一次拉普拉斯”, “最终移动电话”, “最终结果”, “第一页CPC”, “身份证”, “印象辅助转换”, “ImpressionAssistedConversionOverlastClickConversions”, “ImpressionAssistedConversionValue”, “印象”, “印象意义”, “是否定的”, “关键字匹配类型”, “LabelIds”, “标签”, “月”, “蒙托夫年”, “PlacementUrl”, “重要意义”, “PrimaryCompanyName”, “质量分数”, “季度”, “SearchExactMatchImpressionShare”, “SearchImpressionShare”, “SearchRankLostImpressionShare”, “插槽”, “TrackingUrlTemplate”, “UrlCustomParameters”, “ValuePerConversion”, “ValuePerConversionManyPerClick”, “ViewThroughConversions”, “一周”, “年”

};
public static void downloadConsolidatedReportFile(字符串[]列名称,最终ReportDefinitionDateRangeType for数据范围,最终ReportDefinitionReportType ReportDefinitionReportType,最终字符串到)引发异常{
com.google.api.ads.adwords.lib.jaxb.v201409.Selector Selector=新建com.google.api.ads.adwords.lib.jaxb.v201409.Selector();
selector.getFields().addAll(list.newArrayList(columnNames));
ReportDefinition ReportDefinition=新的ReportDefinition();
reportDefinition.setReportName(“Report”+reportDefinitionReportType.value()+“for dateRange”+ForDaterRange.value());
reportDefinition.setDateRangeType(ForDaterRange);
reportDefinition.setReportType(reportDefinitionReportType);
reportDefinition.setDownloadFormat(DownloadFormat.CSV);
ReportingConfiguration ReportingConfiguration=new ReportingConfiguration.Builder()
.skippreperheader(正确)
.skipprepartsummary(true)
.build();
session.setReportingConfiguration(reportingConfiguration);
报表定义。设置选择器(选择器);
BufferedWriter bw=新的BufferedWriter
    };
 public static void downloadConsolidatedReportFile(String[] columnNames, final ReportDefinitionDateRangeType forDateRange, final ReportDefinitionReportType reportDefinitionReportType, final String to) throws Exception {
    com.google.api.ads.adwords.lib.jaxb.v201409.Selector selector = new com.google.api.ads.adwords.lib.jaxb.v201409.Selector();
    selector.getFields().addAll(Lists.newArrayList(columnNames));
    ReportDefinition reportDefinition = new ReportDefinition();
    reportDefinition.setReportName("Report " + reportDefinitionReportType.value() + " for dateRange " + forDateRange.value());
    reportDefinition.setDateRangeType(forDateRange);
    reportDefinition.setReportType(reportDefinitionReportType);
    reportDefinition.setDownloadFormat(DownloadFormat.CSV);

    ReportingConfiguration reportingConfiguration = new ReportingConfiguration.Builder()
            .skipReportHeader(true)
            .skipReportSummary(true)
            .build();
    session.setReportingConfiguration(reportingConfiguration);

    reportDefinition.setSelector(selector);

    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(to)));
    String mccId = session.getClientCustomerId(); //The id from ads.properties file
    Collection<Client> clientIds = getClientAccountIds(mccId);
    try {
        for (Client cl : clientIds) {
            BufferedReader reader = null;
            String customerId = cl.id;
            String name = cl.name;

            session.setClientCustomerId(cl.id);
            try {
                ReportDownloadResponse response =
                        new ReportDownloader(session).downloadReport(reportDefinition);
                if (response == null || response.getHttpStatus() != 200) {
                    handleError(response);
                }
                BufferedInputStream bs = new BufferedInputStream(response.getInputStream());
                reader = new BufferedReader(new InputStreamReader(bs));
                String line = null;
                log.info("getting " + reportDefinition.getReportType().value() + " for " + customerId+" "+name);
                reader.readLine(); //Skip the first line of column names
                while ((line = reader.readLine()) != null) {
                    bw.write(line + "\n");
                }
            } catch (DetailedReportDownloadResponseException e) {
                log.error("An error was thrown downloading report for Customer id: " + customerId+" "+name, e);
                //We have to do this as we have to filter out the mcc id. An exception is thrown by MCC id
                if (e.getType().equals("ReportDefinitionError." + ReportDefinitionErrorReason.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH.getValue())) {
                    continue;
                } else {
                    throw e;
                }

            } catch (Exception e) {
                log.error("An error was thrown downloading report for Customer id: " + customerId+" "+name, e);
                throw e;
            } finally {
                if (reader != null) {
                    reader.close();
                }
            }

        }
    } finally {
        if (bw != null) {
            bw.flush();
            bw.close();
        }
    }
}
AssistClicksOverLastClicks
Bounces
ClickAssistedConversionValueLong
ClickAssistedConversionValueNonMoney
ImpressionAssistedConversionValueLong
ImpressionAssistedConversionValueNonMoney
LastClickConversions
LastClicks
NewVisitors
Pageviews
VisitDuration
Visits