如何找出哪些列组合在AdWords中有效 [英] How do I find out which column combinations are valid in adwords

查看:209
本文介绍了如何找出哪些列组合在AdWords中有效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用adwords api来生成报告。
请耐心等待,因为我对此不太熟悉。
我正在使用api的v201409版本。
我使用getReportFields获取了KEYWORD_PERFORMANCE_REPORT的报告列。
然后尝试使用这些列的子集下载报告。



对于KEYWORD_PERFORMANCE_REPORT,我收到错误消息:


无法选择设备和
的组合AssistClicks,AssistClicksOverLastClicks,AssistImpressions,AssistImpressionsOverLastClicks,AveragePageviews,AverageTimeOnSite,BounceRate,Bounces,ClickAssistedConversionValue,ClickAssistedConversionValueLong,ClickAssistedConversionValueNonMoney,ClickAssistedConversions,ClickAssistedConversionsOverLastClickConversions,ImpressionAssistedConversionValue ,ImpressionAssistedConversionValueLong,ImpressionAssistedConversionValueNonMoney,ImpressionAssistedConversions,ImpressionAssistedConversionsOverLastClickConversions,LastClickConversions,LastClicks,NewVisitors,Pageviews,PercentNewVisitors,VisitDuration,Visits,
Type:ReportDefinitionError.INVALID_FIELD_NAME_FOR_REPORT。

问题是:如何找出一组有效的组合没有经过试验和错误过程的列...是否有任何文档,这将帮助我相同。



我在 http://developers.guge.io/adwords/api/docs/appendix/reports 并排除列表api表示不兼容。有类似的错误。
谢谢


N.B>如果我使用在线示例中提供的列代码尝试此代码,并按预期下载报告。
代码是:
`
String [] columnNames = {
ConversionRateManyPerClickSignificance,
ConversionRateSignificance,
ViewThroughConversionsSignificance,
AccountCurrencyCode,
AccountDescriptiveName,
AccountTimeZoneId,
AdGroupId,
AdGroupName,
AdGroupStatus,
AssistImpressions,
AssistImpressionsOverLastClicks,
AverageCpc,
AverageCpm,
AveragePageviews,
AveragePosition,
AverageTimeOnSite ,
BiddingStrategyId,
BiddingStrategyName,
BiddingStrategyType,
CampaignId,
CampaignName,
Campaign状态,
ClickAssistedConversionsOverLastClickConversions,
ClickAssistedConversionValue,
Clicks,
ClickSignificance,
ClickType,
ConversionManyPerClickSignificance ,
ConversionRate,
ConversionRateManyPerClick,
转化次数,
ConversionSignificance,
ConversionsManyPerClick,
ConversionTypeName,
ConversionValue,
Cost,
CostPerConversion,
CostPerConversionManyPerClick,
CostPerConversionManyPerClickSignificance,
CostPerConversionSignificance,
CostSignificance,
CpcBid,
CpcBidSource,
CpmBid,
CpmSignificance,
CriteriaDestinationUrl,
Ctr,
CtrSignificance,
CustomerDescriptiveName,
CvrSignificance,
日期,
DayOfWeek,
设备,
ExternalCustomerId,
FinalAppUrls,
FinalMobileUrls,
FinalUrls,
FirstPageCpc,
Id,
ImpressionAssistedConversions,
ImpressionAssistedConversionsOverLastClickConversions,
ImpressionAssistedConversionValue,
展示次数,
ImpressionSignificance,
IsNegative,
KeywordMatchType,
LabelIds,
Labels,
Month,
MonthOfYear,
PlacementUrl,
PositionSignificance,
PrimaryCompanyName,
QualityScore,
Quarter,
SearchExactMatchImpressionShare ,
SearchImpressionShare,
SearchRankLostImpressionShare,
Slot,
TrackingUrlTemplate,
UrlCustomParameters,
ValuePerConversion,
ValuePerConversionManyPerClick,
ViewThroughConversions,
Week,
Year

 }; 
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(); //来自ads.properties文件的id
Collection< Client> clientIds = getClientAccountIds(mccId);
尝试{
for(Client cl:clientIds){
BufferedReader reader = null;
字符串customerId = cl.id;
String name = cl.name;

session.setClientCustomerId(cl.id);
尝试{
ReportDownloadResponse响应=
新的ReportDownloader(会话).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(); ((line = reader.readLine())!= null){
bw.write(line +\\\
); //跳过列名的第一行

$ b} catch(DetailedReportDownloadResponseException e){
log.error(下载客户ID报告的错误:+ customerId ++ name,e);
//我们必须这样做,因为我们必须过滤出mcc id。 (e.getType()。equals(ReportDefinitionError。+ ReportDefinitionErrorReason.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH.getValue())){
continue; MCC id
引发异常。
} else {
throw e;


} catch(Exception e){
log.error(发生错误,下载客户ID报告:+ customerId ++ name,e);
throw e;
} finally {
if(reader!= null){
reader.close();



$ b}最后{
if(bw!= null){
bw.flush();
bw.close();



`



您在下面的评论中提到的任何列都没有使用。

解决方案

检查以下文档。
https://developers.google .com / adwords / api / docs / appendix / reports / keywords-performance-report#activeviewcpm



对于某些字段与以下字段不兼容选项提供。点击该选项以检查不兼容的组合

I am using the adwords api to generate reports. Please bear with me as I am not too familiar with the same. I am using version v201409 of the api. I get the report columns for KEYWORD_PERFORMANCE_REPORT using getReportFields. I then try to download the report using a subset of those columns.

For KEYWORD_PERFORMANCE_REPORT I get the error:

Cannot select a combination of Device and AssistClicks,AssistClicksOverLastClicks,AssistImpressions,AssistImpressionsOverLastClicks,AveragePageviews,AverageTimeOnSite,BounceRate,Bounces,ClickAssistedConversionValue,ClickAssistedConversionValueLong,ClickAssistedConversionValueNonMoney,ClickAssistedConversions,ClickAssistedConversionsOverLastClickConversions,ImpressionAssistedConversionValue,ImpressionAssistedConversionValueLong,ImpressionAssistedConversionValueNonMoney,ImpressionAssistedConversions,ImpressionAssistedConversionsOverLastClickConversions,LastClickConversions,LastClicks,NewVisitors,Pageviews,PercentNewVisitors,VisitDuration,Visits, Type: ReportDefinitionError.INVALID_FIELD_NAME_FOR_REPORT.

The question is: How do I find out a valid set of combinations of columns without going through a trial and error process.. Is there any documentation which will help me with the same.

I looked at the columns for KEYWORD_PERFORMANCE_REPORT in http://developers.guge.io/adwords/api/docs/appendix/reports and exclude the colums which the api said were "not compatible". Got a similar error. Thanks

N.B> If I try this code with the columns provided in the online example it works and downloads the report as expected. The code is: ` String[] columnNames = { "ConversionRateManyPerClickSignificance", "ConversionRateSignificance", "ViewThroughConversionsSignificance", "AccountCurrencyCode", "AccountDescriptiveName", "AccountTimeZoneId", "AdGroupId", "AdGroupName", "AdGroupStatus", "AssistImpressions", "AssistImpressionsOverLastClicks", "AverageCpc", "AverageCpm", "AveragePageviews", "AveragePosition", "AverageTimeOnSite", "BiddingStrategyId", "BiddingStrategyName", "BiddingStrategyType", "CampaignId", "CampaignName", "CampaignStatus", "ClickAssistedConversionsOverLastClickConversions", "ClickAssistedConversionValue", "Clicks", "ClickSignificance", "ClickType", "ConversionManyPerClickSignificance", "ConversionRate", "ConversionRateManyPerClick", "Conversions", "ConversionSignificance", "ConversionsManyPerClick", "ConversionTypeName", "ConversionValue", "Cost", "CostPerConversion", "CostPerConversionManyPerClick", "CostPerConversionManyPerClickSignificance", "CostPerConversionSignificance", "CostSignificance", "CpcBid", "CpcBidSource", "CpmBid", "CpmSignificance", "CriteriaDestinationUrl", "Ctr", "CtrSignificance", "CustomerDescriptiveName", "CvrSignificance", "Date", "DayOfWeek", "Device", "ExternalCustomerId", "FinalAppUrls", "FinalMobileUrls", "FinalUrls", "FirstPageCpc", "Id", "ImpressionAssistedConversions", "ImpressionAssistedConversionsOverLastClickConversions", "ImpressionAssistedConversionValue", "Impressions", "ImpressionSignificance", "IsNegative", "KeywordMatchType", "LabelIds", "Labels", "Month", "MonthOfYear", "PlacementUrl", "PositionSignificance", "PrimaryCompanyName", "QualityScore", "Quarter", "SearchExactMatchImpressionShare", "SearchImpressionShare", "SearchRankLostImpressionShare", "Slot", "TrackingUrlTemplate", "UrlCustomParameters", "ValuePerConversion", "ValuePerConversionManyPerClick", "ViewThroughConversions", "Week", "Year"

    };
 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();
        }
    }
}

`

None of the columns you mentioned in the comment below are used.

解决方案

Check the following documentation. https://developers.google.com/adwords/api/docs/appendix/reports/keywords-performance-report#activeviewcpm

For some fields "Not compatible with the following fields" option is provided. Click on that option to check the combinations that are not compatible

这篇关于如何找出哪些列组合在AdWords中有效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆