【问题标题】:Saved Query is not working via API google ad manager(report service api)保存的查询无法通过 API 谷歌广告管理器工作(报告服务 api)
【发布时间】:2021-06-11 15:33:10
【问题描述】:

我们尝试通过 Python 客户端下载在 UI 上创建的报告,并得到响应 'isCompatibleWithApiVersion': False 与所有版本的客户端(v202102、v202011、v202008、v202105)

from googleads import ad_manager
from googleads import errors

SAVED_QUERY_ID = '12456###'

client = ad_manager.AdManagerClient.LoadFromStorage()

# Initialize appropriate service.
report_service = client.GetService('ReportService', version='v202105')

# Initialize a DataDownloader.
report_downloader = client.GetDataDownloader(version='v202105')

# Create statement object to filter for an order.
statement = (ad_manager.StatementBuilder(version='v202105')
           .Where('id = :id')
           .WithBindVariable('id', int(saved_query_id))
           .Limit(2))

response = report_service.getSavedQueriesByStatement(statement.ToStatement())
print(response)

是否可以下载在 UI(Google 广告管理器)上创建的准确报告。 参考链接:https://github.com/googleads/googleads-python-lib/blob/master/examples/ad_manager/v202105/report_service/run_saved_query.py

【问题讨论】:

    标签: google-api-python-client google-ad-manager


    【解决方案1】:

    我遇到了同样的问题。似乎并非所有在 UI 上创建的报告都可以通过 api 处理。

    在这些情况下,谷歌说你需要在 api 端创建相同的报告并从那里运行它..

    【讨论】:

      猜你喜欢
      • 2011-10-16
      • 1970-01-01
      • 2021-07-16
      • 2022-08-20
      • 2020-03-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多