Google ADS API-如何获取通过Google ADS API(节点JS)创建的所有广告系列

发布于 2025-02-01 19:18:40 字数 759 浏览 2 评论 0 原文

我正在尝试找到通过特定经理帐户或通过Google ADS API创建的Google Ads广告系列的总成本。

我尝试了更改事件查询,它为我提供了通过Google Ads创建的所有广告系列,但问题与 thats_event.change_date_time 一起。它需要此过滤器,否则会引发错误。由于使用此过滤器,我只会收到在此特定时间段内创建的广告系列,但是我需要所有广告系列。

SELECT
  change_event.campaign
FROM change_event
WHERE
  campaign.status != 'REMOVED'
  AND change_event.change_date_time >= '${from_date}'
  AND change_event.change_date_time <= '${to_date}'
  AND change_event.client_type = 'GOOGLE_ADS_API'
ORDER BY change_event.change_date_time ASC
LIMIT 10000

参考链接:

I am trying to find the total cost of google ads campaigns that are created via a particular manager account or via google ads api.

I tried the change event query where it gives me all the campaigns created via google ads but the issue is with change_event.change_date_time. It requires this filter otherwise it throws an error. Because of this filter, I am only getting campaigns that are created in this specific time period, but I need all campaigns.

SELECT
  change_event.campaign
FROM change_event
WHERE
  campaign.status != 'REMOVED'
  AND change_event.change_date_time >= '${from_date}'
  AND change_event.change_date_time <= '${to_date}'
  AND change_event.client_type = 'GOOGLE_ADS_API'
ORDER BY change_event.change_date_time ASC
LIMIT 10000

Reference Link: https://developers.google.com/google-ads/api/fields/v9/change_event_query_builder

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

世俗缘 2025-02-08 19:18:40

不幸的是, change_event 只能检索最多30天大的数据(请参阅此处)。

我已经尝试构建一个可以获取该信息的查询,但是从广告系列中使用,但是似乎只有 change_event 才能访问创建广告系列的方式。

一个可能的解决方案是从帐户创建日期开始,以30天的周期从/到日期创建多个。

否则,您可以使用 更改状态 a>在稍大的90天窗口中,限制您无法通过 thats_event.client_type ='google_ads_api' theck> change> thats_status.resource.resource_status ='添加'而不是。

SELECT
  change_status.campaign
FROM change_status
WHERE
  campaign.status != 'REMOVED'
AND change_status.resource_status = 'ADDED'
AND change_status.last_change_date_time >= '${from_date}'
AND change_status.last_change_date_time <= '${to_date}'
ORDER BY change_status.last_change_date_time ASC
LIMIT 10000

Unfortunately, change_event can only go retrieve data up to 30 days old (see here).

I've tried building a query that could get that information but using FROM campaign but it seems like only change_event has access to how a campaign was created.

A possible solution would be to create multiple from/to date on 30-day cycles, starting from the account creation date.

Otherwise, you can use change status for a slightly larger window of 90 days, with the limitation that you can't filter by change_event.client_type = 'GOOGLE_ADS_API', using simply change_status.resource_status = 'ADDED' instead.

SELECT
  change_status.campaign
FROM change_status
WHERE
  campaign.status != 'REMOVED'
AND change_status.resource_status = 'ADDED'
AND change_status.last_change_date_time >= '${from_date}'
AND change_status.last_change_date_time <= '${to_date}'
ORDER BY change_status.last_change_date_time ASC
LIMIT 10000
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文