Whole bidding strategy is missing while quering from campaign

319 views
Skip to first unread message

Algirdas Jarockis

unread,
Dec 16, 2021, 5:09:10 AM12/16/21
to AdWords API and Google Ads API Forum
Hello,
I'm using php google ads v9 client.

I was testing a simple query:
SELECT campaign.bidding_strategy, bidding_strategy.id, bidding_strategy.name, bidding_strategy.type FROM campaign WHERE campaign.status IN ('ENABLED', 'PAUSED') AND segments.date BETWEEN '2021-12-08' AND '2021-12-08'

It successfully returns campaign.bidding_strategy resource name, meaning campaigns really do have assigned strategies, however attributed bidding_strategy.* are not returned at all from this query, result:
[
{
"campaign": {
"resourceName": "customers/<redacted>/campaigns/<redacted>",
"biddingStrategy": "customers/<redacted>/biddingStrategies/<redacted>"
}
},
{
"campaign": {
"resourceName": "customers/<redacted>/campaigns/<redacted>",
"biddingStrategy": "customers/<redacted>/biddingStrategies/<redacted>"
}
},
...
]
In output we should see "biddingStrategy" element.

Algirdas Jarockis

unread,
Dec 16, 2021, 8:09:56 AM12/16/21
to AdWords API and Google Ads API Forum
It also doesn't work when selecting from ad_group resource.

Google Ads API Forum Advisor

unread,
Dec 16, 2021, 12:59:16 PM12/16/21
to algirdas...@gmail.com, adwor...@googlegroups.com

Hello Algirdas,

Thanks for reaching out to the Google Ads API support. I have tried the same GAQL query on my end you provided and I was able to generate the (ENABLED and PAUSED) records when I removed the segments field, since these ENABLED and PAUSED campaigns have zero impressions, and when adding segment fields, and as per this documentation, "Zero impressions are always excluded when segmenting a report.."
This is the reason why these campaigns were initially not being returned to all the fields from that query. Let me know if this helps you understand the behavior of the query. Feel free to write if you have any follow up questions.

Regards,

Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey

Google Logo
Jakeia Sabrina
Google Ads API Team
 

ref:_00D1U1174p._5004Q2TLkvR:ref

Algirdas Jarockis

unread,
Dec 17, 2021, 3:55:16 AM12/17/21
to AdWords API and Google Ads API Forum
Hello.
I'm afraid zero impressions has nothing to do with it and it is clearly a bug which should be looked at. My returned records have positive impression count, the problem is about bidding_strategy info not assigned when it's clearly have to be assigned. I simplified my mentioned query in my original post just to focus on main problem. With production  query I'm requesting such fields (from resource campaign):
  1. campaign.id
  2. bidding_strategy.id
  3. bidding_strategy.name and so on.
  4. other fields like segments.date, segments.device, metrics.impressions, metrics.clicks and so on
Attributed field bidding_strategy as I understand should work in a same way when requesting other attributed fields like customer.id.I double checked, those campaigns have bidding strategy assigned and old adwords api returns them successfully. Important note: this ads api query worked week ago and for unknown reason it stopped returning this attributed field.

Algirdas Jarockis

unread,
Dec 17, 2021, 7:08:44 AM12/17/21
to AdWords API and Google Ads API Forum
Ok,
after trying out different angles I think I learned new things:
  • bidding_strategy is returned only when it's created on account level, it is not returned when it's created under manager account
  • accessible_bidding_strategy should be used instead, because it is returned regardless on what level it is created
It is not clear what is accessible_bidding_strategy and in what cases we would need to join bidding_strategy because. However there are still some problems if I want additional data like strategy settings (troas value, min and max bids). I'm not sure should I create a separate topic for that? However I will try to explain new issues I found anyway. Please look at my query and single result below, you can see that some info I request is not given.

Query:
SELECT accessible_bidding_strategy.id,
accessible_bidding_strategy.target_roas.target_roas,
campaign.target_roas.cpc_bid_ceiling_micros,
campaign.target_roas.target_roas,
bidding_strategy.target_roas.cpc_bid_ceiling_micros,
bidding_strategy.target_roas.target_roas
FROM campaign
WHERE segments.date = '2021-12-08'

Some one record taken from list of result:
{
"biddingStrategy": {
  "resourceName": "customers/<redacted>/biddingStrategies/1337",
  "targetRoas": {
    "targetRoas": 0.15,
    "cpcBidCeilingMicros": "1200000"
  }
},
"campaign": {
  "resourceName": "customers/<redacted>/campaigns/<redacted>"
},
"accessibleBiddingStrategy": {
  "resourceName": "customers/<redacted>/accessibleBiddingStrategies/1337",
  "id": "1337",
  "targetRoas": {
    "targetRoas": 0.15
  }
}
}

As you can see, both types of strategy are returned with same id. Strategy was created on account level. If strategy is created on master account, only "accessibleBiddingStrategy" would be present. That's what would be the answer to my initial question. However this "accessibleBiddingStrategy" has fewer fields than "biddingStrategy" because it doesn't provide fields like: *.target_roas.cpc_bid_ceiling_micros which exists in biddingStrategy. In summary, there is a list of fields which are missing or empty in campaign and accessibleBiddingStrategy:
  1. accessibleBiddingStrategy.target_roas.cpc_bid_ceiling_micros
  2. accessibleBiddingStrategy.target_roas.cpc_bid_floor_micros
  3. campaign.target_roas.cpc_bid_ceiling_micros is empty
  4. campaign.target_roas.cpc_bid_floor_micros is empty
  5. campaign.target_roas.target_roas is empty
So, again. it's not very clear what's the difference between accessibleBiddingStrategy and biddingStrategy. They can be returned both from api with same id and behave differently (missing fields, biddingStrategy when it's available works perfect and has everything I need).

Google Ads API Forum Advisor

unread,
Dec 17, 2021, 5:18:22 PM12/17/21
to algirdas...@gmail.com, adwor...@googlegroups.com

Hello Algirdas,

Thanks for the clarification and providing all the details. We are trying to figure out the issue you have encountered. With regards to your query on this, the accessible_bidding_strategy resource does not provide metrics and only exposes a limited subset of the BiddingStrategy attributes where the bidding_strategy resource does. We join bidding_strategy whenever we like to fetch bidding_strategies metrics data on the report.

To investigate the issue further, could you please provide us with the complete request and response logs, with the request-id from when you have experienced the issue. Please use the Reply privately to the author option while sharing the details to ensure the information is shared privately.



Regards,

Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey

Reply all
Reply to author
Forward
0 new messages