谷歌的Adwords API的问题在" ORDER BY"条款和平均每次点击费用计算 [英] Google Adwords API Issues in "ORDER BY" clause and Average CPC calculations
问题描述
我对我的客户合作的MCC帐户报告功能。
I am working on my clients MCC account for reporting functionalities.
我使用谷歌的Adwords API的PHP版本v201309(最新)。
I am using Google Adwords PHP API version v201309 (latest).
好吧,当我面对一个查询错误而执行该文件。与AWQL获取结果集(报告/ DownloadCriteriaReportWithAwql.php)
Ok while fetching the resultset with AWQL (Reporting/DownloadCriteriaReportWithAwql.php) i am facing one query error while executing that file.
这就是:键入='QueryError.INVALID_ORDER_BY_CLAUSE',触发='',FieldPath会=''
而没有错我的查询:
$dateRange = sprintf('%d,%d',
date('Ymd', strtotime('1989-01-01')), date('Ymd', strtotime('now')));
'SELECT CampaignId, CampaignName, AverageCpc, Conversions,
Cost, Date FROM CRITERIA_PERFORMANCE_REPORT
WHERE CampaignName
IN ["Local - Search", "Local - Display", "Display New Landing"]
DURING '.$dateRange.' ORDER BY Date';
我面临的另一个问题是平均每次点击费用,有不同数量的客户端MCC帐户,并在特定日期API响应输出。
我想澄清你,我使用AWQL(报告/ DownloadCriteriaReportWithAwql.php)创造产出的直接.csv文件。
Another issue i am facing is of Average CPC, there is a different amount in client MCC account and in API response output for particular date. i want to clarify you that i am using AWQL (Reporting/DownloadCriteriaReportWithAwql.php) which creates direct .csv file of output.
请检查屏幕截图。
- CSV文件输出
- 现场MCC帐户
感谢您阅读我的问题。
推荐答案
报告不支持ORDER BY或LIMIT子句。结果将是
在任何特定的顺序返回。
reports do not support the ORDER BY or LIMIT clauses. Results will be returned in no particular order.
我被输出到谷歌小号preadsheet。我的解决办法是做作出这样的公式 =排序排序的输出数据的第二片(帐户上个月!A2:E32; 1;真)
I was outputting to a Google Spreadsheet. My solution was to do make a second sheet that sorted the outputted data by the formula =sort('Account Last Month'!A2:E32;1;true)
这篇关于谷歌的Adwords API的问题在" ORDER BY"条款和平均每次点击费用计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!