Api Google Adwords我们如何在当月但每天获得一个广告系列的报告?
问题描述:
i need to generate the report using the api google adwords , for just one campain , during the current month but per each day , here is my query :
$reportQuery = 'SELECT CampaignId,CampaignName, Impressions, Clicks, Cost '
. ' FROM CAMPAIGN_PERFORMANCE_REPORT '
. ' WHERE CampaignId = '.$campaignId.' DURING this_month';
i would like to get the result in this format :
date | impressions | clicks | ...
01/11| 12356785 | 23561 | ...
02/11| 23567985 | 3561 | ...
03/11| 82356785 | 56892 | ...
04/11| 62356785 | 562234 | ...
Is it possible ? if not how we can get the report without downloading the file ? Thanks
我需要使用api google adwords生成报告,仅针对一个campain,在当月,但每个 一天,这是我的查询: p>
$ reportQuery ='SELECT CampaignId,CampaignName,Impressions,Clicks,Cost'
。 'FROM CAMPAIGN_PERFORMANCE_REPORT'
。 'WHERE CampaignId ='。$ campaignId。' 在this_month';
code> pre>
我希望以这种格式得到结果: p>
date | 印象| 点击| ... \ N01 / 11 | 12356785 | 23561 | ... \ N02 / 11 | 23567985 | 3561 | ... \ N03 / 11 | 82356785 | 56892 | ... \ N04 / 11 | 62356785 | 562234 | ...
code> pre>
有可能吗? 如果不是我们如何在不下载文件的情况下获得报告?
谢谢 p>
div>
答
Adding the Date
field to your query should do the trick. As mentioned here, Date
has "Segment" behavior, so it will give you a new line with all the other metrics for every single one of its own values.