I’m looking for assistance with some adwords API integration work I am doing. Here is the background:
I am able to first create the campaing no problem and get the campaignID back.
I then want to set location targeting (city, state) and apply a radius of 25 miles. When I do this step I’m getting an error I can’t explain or get around, I’ve posted the code below.
So two questions.
Hi Dmitry,
Thank you for reaching out. The CampaignCriterionError.CONCRETE_TYPE_REQUIRED error usually occurs when you are not specifying the type of criterion to mutate. This doesn't seem to be the case here but based on your logs, it looks like you are missing some fields in your request. You can use this example (in the language you are using) to add location criteria to your campaign. If that doesn't work, please provide the complete SOAP logs for that request so that I can investigate further.
Regards,
Mitchell
Google Ads API Team
As I've written, I'm writing on Go. Google does not provide any official Google AdWords library for Go, so I have to deal with HTTP requests to https://adwords.google.com/api/adwords/cm/v201809/. And XML objects are made by marshalling native structs to the XML and it's all logs that I have.
I create objects based on https://developers.google.com/adwords/api/docs/reference/v201809/CampaignCriterionService.Location and https://adwords.google.com/api/adwords/cm/v201809/CampaignCriterionService?wsdl.
I didn't find any information about extra fields to the criterion object I should add and how to form it with those fields.
It is nice if you have some example with already filled XML object for campaign criterion to set location targeting.
Hope, you have :)
Thanks!