LocationCriterionService doesn't return country codes

245 views
Skip to first unread message

Ian Knox

unread,
Oct 31, 2012, 8:54:50 PM10/31/12
to adwor...@googlegroups.com
It's handy but currently the country code attribute seems broken (or at least with the PHP client)


  $selector->fields = array('Id', 'LocationName', 'CanonicalName','DisplayType',  'ParentLocations', 'Reach', 'TargetingStatus', 'CountryCode');
  $selector->predicates[] = new Predicate('ID', 'EQUALS', 2084);

Yields: 

Array
(
    [0] => LocationCriterion Object
        (
            [location] => Location Object
                (
                    [locationName] => Ukraine
                    [displayType] => Country
                    [targetingStatus] => ACTIVE
                    [parentLocations] =>
                    [id] => 2804
                    [type] =>
                    [CriterionType] => Location
                    [_parameterMap:Criterion:private] => Array
                        (
                            [Criterion.Type] => CriterionType
                        )

                )

            [canonicalName] => Ukraine
            [reach] => 4100000
            [locale] =>
            [searchTerm] =>
            [countryCode] =>
        )

)

Danial Klimkin

unread,
Nov 2, 2012, 7:58:42 AM11/2/12
to adwor...@googlegroups.com
Hello Ian,


'CountryCode' is not a valid selector field according to the documentation:



-Danial, AdWords API Team.

armin....@netekspert.com

unread,
Jun 16, 2016, 1:05:00 PM6/16/16
to AdWords API Forum
As with version v201603 "CountryCode" seems to be a valid field, nevertheless it does not return any value. 
Please help!
thanks,
Armin

armin....@netekspert.com

unread,
Jun 16, 2016, 1:05:00 PM6/16/16
to AdWords API Forum
I'm struggling with the same issue..

What is the right field name then? 

"CountryCode" seems to be accepted, but the service does not return any value.

Thanks for a hint.

Anthony Madrigal

unread,
Jun 16, 2016, 2:36:37 PM6/16/16
to AdWords API Forum
Hello Armin,

I saw that you posted this question on a new thread. I will take a look at it and respond to you there as soon as I can.

Regards,
Anthony
AdWords API Team

armin....@netekspert.com

unread,
Jun 16, 2016, 2:50:10 PM6/16/16
to AdWords API Forum
All right, good to hear that. 
It's weird because the Locations file (csv) provided by Google does contain Country Codes. So it's confusing why these  values are not returned by the service.
thanks,
Armin
Reply all
Reply to author
Forward
0 new messages