【发布时间】:2014-09-13 03:44:16
【问题描述】:
我在 AWQL 中有这个查询,我使用 ReportUtils::DownloadReportWithAwql 得到 CSV 格式的响应
select Date, Clicks, Cost from ACCOUNT_PERFORMANCE_REPORT during LAST_30_DAYS
我需要将 CSV 中的成本数据从微观转换为帐户中的货币 (Cost / 1000000)。
我还需要能够使用 any AWQL 查询转换响应中的任何 Cost 数据,例如,该解决方案也必须适用于该查询:
SELECT CampaignName, KeywordText, Cost, CostPerConversion, QualityScore FROM KEYWORDS_PERFORMANCE_REPORT DURING LAST_7_DAYS
从 v201406 开始,returnMoneyInMicros 标头不再有效,值始终以 micros 形式返回。 https://developers.google.com/adwords/api/docs/guides/reporting-concepts#money
这是我在 stackoverflow 中的第一个问题。
【问题讨论】:
-
@drep 我进行了 2 个查询,结果是 here 现在假设您在 $variable1 中有 cost1,在 $variable2 中有 cost2。如何使用相同的函数将变量中的成本和成本/转换列除以 1000000?
标签: php csv google-ads-api adwords-budgetservice