大约一年后成功使用this SO solution,我的代码用于获取Google AdWords广告系列的每日费用,如下所示:
sum += campaign.campaignStats.cost.microAmount / 1000000m;
即我正在使用campaignStats property .
不幸的是,在API的最新版本 v201309 中,此属性不再存在 .
我搜索了the official .NET wrapper的所有示例,并查看了API文档,但没有找到关于如何管理它的单一线索 .
Therefore my question is:
如何通过最新的Google AdWords API检索AdWord campain的每日费用?
Update 1:
我找到了this discussion in the AdWords API forum . 他们建议生成报告,获取并解析此报告 . 关于它也有an AdWords blog entry .
3 回答
这是一个PHP版本:
$ filePath = tempnam('/ tmp','adwordsreport');
这是我提出的工作解决方案:
Also available via Pastebin.com .
使用
PHP
代码获取最新APIv201506
和v201509
以获取日期范围内的成本总和 .用法: