通过 Google AdWords php API 获取客户发票
我想使用 Google AdWords API 通过 php 提取客户发票。这将使我的客户计费过程更加简化。我该如何利用 AdWords API 来做到这一点?
I want to use the Google AdWords API to pull my clients invoices via php. This will make the process of billing my clients much more streamlined. How would I do this utilizing the AdWords API?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我假设您想要提取与特定帐户和/或活动相关的成本数据,以便将其放入发票中。最简单的方法是使用 AdWords API 的报告服务。 Google 提供了一个 PHP 库来执行此操作,您可以从 http://code 下载.google.com/p/google-api-adwords-php/ 下载内容还包含演示如何下载报告的示例。
I'm assuming you want to pull out the cost data associated with specific accounts and/or campaigns so it can be put into invoices. This simplest way to do this is using the reporting service of the AdWords API. Google provides a PHP library to do this that you can download from http://code.google.com/p/google-api-adwords-php/ The download also contains an example demonstrating how to download a report.
生成自己的发票时要小心。由于点击欺诈调整是一个持续的过程,除非您在 Google 生成自己的发票的同时提取报告,否则您的数字很可能与 Google 计费的数字不同。如果您代表有权访问自己的 adWords 帐户的客户生成发票,请准备好解释为什么两张发票不匹配。
Be careful about generating your own invoices. Because click fraud adjustment is an ongoing process, unless you pull your report at the exact moment as Google generates their own invoice, there is a good chance that your numbers will be different from what Google bills. If you are generating invoices on behalf of clients who have access to their own adWords accounts, be prepared to explain why the two invoices don't match.
不幸的是,目前似乎无法从 Google Adwords 帐户检索发票。我想出的解决方法是通过gapi (http://code.google.com/p/gapi-google-analytics-php-interface/)访问链接的Google Analytics帐户并自己生成发票。以下是获取特定日期范围内的 AdWords 数据的方法:
Unfortunately, it seems that at this current time, there is no way to retrieve invoices from a Google Adwords account. The workaround I came up with, was to access the linked Google Analytics account via the gapi (http://code.google.com/p/gapi-google-analytics-php-interface/) and generate the invoice myself. This is how to get adwords data for a specific date range: