CampaignCriterionService return empty parentsLocations

63 views
Skip to first unread message

alexander...@brainson.de

unread,
Mar 4, 2016, 11:16:02 AM3/4/16
to AdWords API Forum
Hallo Guys,

today was my first day with the Adwords API.
I use the Beta Version of the Framework: https://github.com/googleads/googleads-php-lib/tree/experimental

Now I would like to get all Location Criterions of a Campaign.
And I get it, but the parentLocations are empty (except the ID)

My Code is like: http://pastebin.com/m4BexPa0
The Request Id is: 00052d3ac61a26c80ac4e544b5072676

And the Return is like:

object(Google\AdsApi\AdWords\v201601\cm\Location)[89]
  protected 'locationName' => null
  protected 'displayType' => null
  protected 'targetingStatus' => null
  protected 'parentLocations' => null
  protected 'id' => int 2276
  protected 'type' => null
  protected 'CriterionType' => null
  public 'Criterion.Type' => string 'Location' (length=8)

It is a Bug? Or made a Mistake?
I hope you can help me out ;)

 

Yin Niu

unread,
Mar 4, 2016, 12:11:58 PM3/4/16
to AdWords API Forum
Hello, 

Could you please send SOAP request and response log? Just click Reply privately to author in the forum when responding.

Thanks,
Yin, AdWords API Team. 

Michael Cloonan (AdWords API Team)

unread,
Mar 7, 2016, 10:31:50 AM3/7/16
to AdWords API Forum
Hello,

I believe the parent locations are only supposed to populate IDs; this is expected.

You can look up what each ID actually means using our Geographical Targeting page (either manually or by downloading the CSV provided there), or by using the LocationCriterionService.

Regards,
Mike, AdWords API Team

alexander...@brainson.de

unread,
Mar 7, 2016, 12:05:24 PM3/7/16
to AdWords API Forum
Hello,

thanks for your answer. How do I manage it with LocationCriterionService. Can I filter it with ID? Because in die Doc's are only the fields `canonicalName` and `reach`.

Regard,
Alexander Schlegel

Michael Cloonan (AdWords API Team)

unread,
Mar 7, 2016, 12:44:23 PM3/7/16
to AdWords API Forum
Hello,

The LocationCriterion includes a Location, which has an ID that should be filterable.

However, keep in mind that the LocationCriterionService is fairly slow, and doing lookups each time you have an ID is probably going to cause your application to be slower than it needs to be. A better alternative would be to download and parse the provided CSV file from the Geographical Targeting page, which is kept up to date with complete information from the LocationCriterionService.

Regards,
Mike, AdWords API Team

alexander...@brainson.de

unread,
Mar 8, 2016, 3:18:14 AM3/8/16
to AdWords API Forum
Hello,

okay thanks for your answer.
I will make it with die CSV, you are right.

Thanks for your help and a have a nice day,

Regards,
Alexander Schlegel
Reply all
Reply to author
Forward
0 new messages