如何从谷歌adwords api v2001502获得ConversionValue

时间:2015-05-06 11:29:21

标签: php google-adwords adwords-apiv201402

我已经下载了Google Adwords API的PHP客户端库。我需要获取' ConversionsManyPerClick'来自api的数据,我无法从客户端库中找到相同的选项。但同时我可以使用这个' AD_PERFORMANCE_REPORT'将此数据作为文件。方法。请帮帮我。

    function DownloadCriteriaReportExample(AdWordsUser $user, $filePath) {
      // Load the service, so that the required classes are available.
      $user->LoadService('ReportDefinitionService');

      // Create selector.
      $selector = new Selector();

      $selector->fields = array('Headline','Description1','Description2','DisplayUrl','AdGroupName','CampaignName','Clicks','ConversionsManyPerClick');

      $selector->predicates[] = new Predicate('Status', 'NOT_IN', array('PAUSED'));

      $reportDefinition = new ReportDefinition();
      $reportDefinition->selector = $selector;
      $reportDefinition->reportName = 'ad performance report #' . uniqid();
      $reportDefinition->dateRangeType = 'LAST_30_DAYS';
      $reportDefinition->reportType = 'AD_PERFORMANCE_REPORT';
      $reportDefinition->downloadFormat = 'CSV';

      $reportDefinition->includeZeroImpressions = FALSE;

      $options = array('version' => 'v201502');

      ReportUtils::DownloadReport($reportDefinition, $filePath, $user, $options);
    }

enter image description here 提前谢谢。

1 个答案:

答案 0 :(得分:0)

请阅读以下文档,并尝试修改核心插件

https://developers.google.com/adwords/api/docs/guides/conversion-tracking