Geo Location info

371 views
Skip to first unread message

Marius S

unread,
Mar 6, 2024, 10:47:22 AMMar 6
to Google Ads API and AdWords API Forum
Hi,

we're using negative location targeting to exclude other countries (according to [1]). We have 198 countries excluded. This was working fine until recently. Now all of a sudden a resource limit exceeded error is popping up ("The request would cause a limit on the number of allowed resources of this type to be exceeded"). Excluding 122 countries is working fine, everything after that leads to the error. I haven't found anything on that in the documentation. Is this a bug in the Google Ads API or intentional? 122 sure seems like an odd number.

Best,
- Marius


Google Ads API Forum Advisor

unread,
Mar 6, 2024, 4:21:33 PMMar 6
to soutier.mo...@gmail.com, adwor...@googlegroups.com
Hi Marius,

Thank you for contacting the Google Ads API support team.

After reviewing your query, I understand that you are encountering a "RESOURCE_LIMIT" error in the Google Ads API. The error occurs when the request exceeds the limit and this request would exceed a limit on the number of allowed resources. The details of which type of limit was exceeded will eventually be returned in ErrorDetails. I would suggest you pass the argument within the limit to avoid encountering the error. Kindly refer to the documents for more information on rate limits and system limits.

If the issue still persists, kindly provide us with the complete API logs (request and response with request-id and request header) generated at your end and uncropped UI screenshot of where you are facing the issue.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02rzj6d:ref"

Thanks,
 
Google Logo Google Ads API Team


Message has been deleted

Marius S

unread,
Mar 7, 2024, 3:26:50 AMMar 7
to Google Ads API and AdWords API Forum
Hi,

the links provided do not list anything related to campaign criteria or geotarget constants. 122 also seems like a very arbitrary number.

Here is the full error message as provided by the API:

error_code {
  resource_count_limit_exceeded_error: RESOURCE_LIMIT
}
message: "The request would cause a limit on the number of allowed resources of this type to be exceeded."
trigger {
  int64_value: 2512
}
location {
  field_path_elements {
    field_name: "mutate_operations"
    index: 124
  }
  field_path_elements {
    field_name: "campaign_criterion_operation"
  }
  field_path_elements {
    field_name: "create"
  }
  field_path_elements {
    field_name: "resource_name"
  }
}

2512 refers to the geotarget constant ID. It is assigned like this:

builder = CampaignCriterion.newBuilder()
  .setCampaign(campaignResourceName)
  .setNegative(true)
builder
  .getLocationBuilder
  .setGeoTargetConstant(ResourceNames.geoTargetConstant(criteriaId))


RequestID: XY8li-E56X8cKNGBaYQGYg
ResponseCode: INVALID_ARGUMENT, Fault: Request contains an invalid argument..

Google Ads API Forum Advisor

unread,
Mar 7, 2024, 8:28:34 AMMar 7
to soutier.mo...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

Upon checking the provided screenshots, I could see you have provided partial logs which are not sufficient for us to investigate further. Could you please provide us with updated complete API logs (request and response with request-id and request header) generated on your end in the text format so that our team can further validate why you are encountering the error.


If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.
 

Marius S

unread,
Mar 7, 2024, 11:05:24 PMMar 7
to Google Ads API and AdWords API Forum
Response Header:

Response
--------
Headers: Metadata(content-type=application/grpc,request-id=QB_7LuyrGlYE_01MwSzyUg,date=Thu, 07 Mar 2024 17:15:48 GMT,alt-svc=h3=":443"; ma=2592000,h3-29=":443"; ma=2592000)
Body: null
After that it's just the errors {} parts from the file.

Marius S

unread,
Mar 7, 2024, 11:05:24 PMMar 7
to Google Ads API and AdWords API Forum
This is straight from the API logs:
error_response.txt
google_ads_request.txt

Google Ads API Forum Advisor

unread,
Mar 8, 2024, 5:31:38 AMMar 8
to soutier.mo...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

Upon checking the provided logs, it is observed that you are doing multiple operations on a single request, which is why you are getting the "RESOURCE_LIMIT" error. Kindly note that when the request exceeds the limit, this request will exceed a limit on the number of allowed resources. I would suggest you refer to the documents Bulk Mutates and Mutate Best Practices to get more information.

I hope this helps. Kindly get back to us if you have any further queries.

Marius S

unread,
Mar 11, 2024, 4:25:01 AMMar 11
to Google Ads API and AdWords API Forum
Hi, 

of course I'm doing multiple requests at once. I'm doing that all the time without a problem. A bulk mutate can take up to 1000 requests, and I am well below that limit.

As I described in my initial post, I want to exclude 200 countries from my campaign. I do that through adding negative campaign criteria. 
It works until I hit 122 criteria, after that the error appears. And this seems to be a recent problem, a couple of months ago this was working fine. So it seems like a bug on Google's end to me.

The documentation doesn't say anything about this, that's why I'm asking here.

Could you please:
- verify there is no boundary on how many negative criteria I can use?
- verify there is no boundary on how many location criteria I can use?
- verify there is no bug with hitting >122 campaign criteria?

Thanks!

Google Ads API Forum Advisor

unread,
Mar 11, 2024, 10:38:18 AMMar 11
to soutier.mo...@gmail.com, adwor...@googlegroups.com
Hi, 

Thank you for getting back to us.

I will check with our team regarding your issue and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02rzj6d:ref" (ADR-00226227)


Thanks,
 
Google Logo Google Ads API Team

 

Marius S

unread,
Mar 11, 2024, 3:23:14 PMMar 11
to Google Ads API and AdWords API Forum
Thanks!

Jonathan Moura

unread,
Mar 28, 2024, 11:56:33 AMMar 28
to Google Ads API and AdWords API Forum
Hello,

I have a campaign targeted to US, is there any benefit on excluding ALL the other countries except US?

Marius S

unread,
Apr 2, 2024, 8:32:15 AMApr 2
to Google Ads API and AdWords API Forum
That's an important question i'd like to have answered as well.

Google Ads API Forum Advisor

unread,
Apr 2, 2024, 10:57:31 PMApr 2
to soutier.mo...@gmail.com, adwor...@googlegroups.com
Hi,

Kindly note that if an area is both included and excluded in your location targeting settings, exclusion takes priority. For example, if you exclude the state of California but target the city of Los Angeles, Los Angeles will be excluded because it is located in California. If you target and exclude Los Angeles, Los Angeles will not receive traffic because of the exclusion. I would suggest you refer to the help center article Exclude ads from geographic locations to get more information.


I hope this helps. Kindly get back to us if you have any further queries.
 

Marius S

unread,
Apr 3, 2024, 7:50:22 PMApr 3
to Google Ads API and AdWords API Forum
And to be more precise, what if you target Los Angeles - should you exclude Mexico and Canada?

Marius S

unread,
Apr 3, 2024, 7:50:23 PMApr 3
to Google Ads API and AdWords API Forum
That doesn't answer the question. If you target US as a country, do you have to exclude other countries (Mexico, Canada, ...)?

Marius S

unread,
Apr 3, 2024, 7:50:23 PMApr 3
to Google Ads API and AdWords API Forum
Actually we're already experiencing clicks from country B although we're targeting only country A. Theory is that this happens when people travel between country A and B.

Google Ads API Forum Advisor

unread,
Apr 4, 2024, 11:20:26 PMApr 4
to soutier.mo...@gmail.com, adwor...@googlegroups.com
Hi,

Kindly note that it is not required to exclude other countries (Mexico, Canada, etc.) when targeting the US in Google Ads. I would recommend you use the Location targeting, which lets you serve ads to users in a particular geographical region. For example, assume you're advertising for a chain of supermarkets. Without location targeting, your ads would show in all regions worldwide, and your ads might receive clicks from users in regions where you have no supermarket locations. This generates costs while providing no possibility of a return on the investment. With location targeting, your campaigns show ads only in regions where you have open supermarkets. Please refer to the help center article on location targeting to get more information.

Also, if you want to exclude other countries while targeting a specific location, you can use location exclusions. Kindly go through the help center article Exclude ads from geographic locations for more details.
Reply all
Reply to author
Forward
0 new messages