【问题标题】:Whats happens with GET Video Adwords CampaignsGET Video Adwords 广告系列会发生什么
【发布时间】:2016-04-08 10:16:27
【问题描述】:

最近我开始了一个项目,从 google adwords api 获取广告系列并制作有关该信息的分析报告。

我有这个问题:

我启动这段代码来获取所有广告系列:

public function testGetCampaigns()
{
    $user = new \AdWordsUser();
    $user->LogAll();

    $campaignService = $user->GetService('CampaignService', 'v201603');

    // Create selector.go
    $selector = new \Selector();
    $selector->fields = array('Id', 'Name');
    $selector->ordering[] = new \OrderBy('Name', 'ASCENDING');

    // Create paging controls.
    $selector->paging = new \Paging(0, \AdWordsConstants::RECOMMENDED_PAGE_SIZE);

    do {
        $page = $campaignService->get($selector);
        if (isset($page->entries)) {
            foreach ($page->entries as $campaign) {
                printf("Campaign with name '%s' and ID '%s' was found.\n",
                $campaign->name, $campaign->id);
            }
        } else {
            print "No campaigns were found.\n";
        }

        $selector->paging->startIndex += \AdWordsConstants::RECOMMENDED_PAGE_SIZE;
    } while ($page->totalNumEntries > $selector->paging->startIndex);

}

但结果不是我创建的两个广告系列,只是一个。

我不得不说,api 没有给我的是视频广告系列,而不是搜索广告系列。

代码结果:

找到了 1 / 1 (100%) 个名为“Testingalot”且 ID 为“469071928”的广告系列。


【问题讨论】:

  • 会不会是分页的问题?

标签: google-ads-api


【解决方案1】:

这是正确的,因为 CampaignService 不会在列表中显示视频广告系列。参见例如https://groups.google.com/forum/#!topic/adwords-api/SH7lk_y4GTw

【讨论】:

  • 我很久以前就解决了这个问题,是的,谷歌很烂,他们没有任何办法在 adwords 中操纵视频广告系列。谢谢
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-06-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多