Is it possible to use multiple LocationExtensionOperand to set different radii on different GeoTargetOperands?

181 views
Skip to first unread message

dkriek...@adready.com

unread,
Sep 22, 2014, 2:48:19 PM9/22/14
to adwor...@googlegroups.com
The only sample code I could find at... https://github.com/googleads/google-api-ads-ruby/blob/2da6d980aba16c90b60dba73a369de8435490d12/adwords_api/examples/v201406/targeting/add_campaign_targeting_criteria.rb
... appears to apply a single radius on all targets previously set.

How would I go about setting different radii on different locations, specifically geoTargetOperands?

ie. if I wanted to target the following:
100 mile radius from New York, USA
AND
300 mile radius from Chicago, USA

Thank you very much


Josh Radcliff (AdWords API Team)

unread,
Sep 23, 2014, 3:30:57 PM9/23/14
to adwor...@googlegroups.com
Hi,

To achieve the type of targeting you described, you'd want to create a CampaignCriterion for each location where each CampaignCriterion.criterion is set to a Proximity criterion.

To give you an idea of the object layout, here's what the criteria would look like:

          <criterion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Proximity">
            <id>83236791893</id>
            <type>PROXIMITY</type>
            <Criterion.Type>Proximity</Criterion.Type>
            <geoPoint>
              <latitudeInMicroDegrees>40712783</latitudeInMicroDegrees>
              <longitudeInMicroDegrees>-74005941</longitudeInMicroDegrees>
            </geoPoint>
            <radiusDistanceUnits>MILES</radiusDistanceUnits>
            <radiusInUnits>100.0</radiusInUnits>
            <address>
              <cityName>New York</cityName>
              <provinceName>NY</provinceName>
              <countryCode>US</countryCode>
            </address>
          </criterion>

          <criterion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Proximity">
            <id>83236791653</id>
            <type>PROXIMITY</type>
            <Criterion.Type>Proximity</Criterion.Type>
            <geoPoint>
              <latitudeInMicroDegrees>41878113</latitudeInMicroDegrees>
              <longitudeInMicroDegrees>-87629798</longitudeInMicroDegrees>
            </geoPoint>
            <radiusDistanceUnits>MILES</radiusDistanceUnits>
            <radiusInUnits>300.0</radiusInUnits>
            <address>
              <cityName>Chicago</cityName>
              <provinceName>IL</provinceName>
              <countryCode>US</countryCode>
            </address>
          </criterion>

Note that in order to create a Proximity object, you'll have to look up the location's GeoPoint first by passing an address to GeoLocationService. The address can be a partial address.

Cheers,
Josh, AdWords API Team

dkriek...@adready.com

unread,
Sep 23, 2014, 4:52:26 PM9/23/14
to adwor...@googlegroups.com
Thanks Josh,
The context of my question was to fulfill C.21 of the Required Minimum Functionality (Set distance targeting),
per https://developers.google.com/adwords/api/docs/requirements ...

It is clear to me now that I misunderstood what "distance targeting" implied/ and what was possible with the Function / LocationExtensionOperand objects. since your response recommends using the Proximity object instead. All the RMF page implies is that I must somehow use LocationExtensionOperand, which is ambiguous. Could you please flesh out the exact functionality/ use cases Google expects to see for us to maintain compliance?

Josh Radcliff (AdWords API Team)

unread,
Sep 24, 2014, 7:31:19 PM9/24/14
to adwor...@googlegroups.com
Hi,

For RMF questions, it's best to contact the API Compliance team via this form:


They'll know the exact intended functionality for each item.

Thanks,
Josh, AdWords API Team

Josh Radcliff (AdWords API Team)

unread,
Apr 28, 2015, 12:17:31 PM4/28/15
to adwor...@googlegroups.com
Hi,

Just wanted to let you know of a few updates/clarifications since my last post:
  1. We had a blog post yesterday regarding forward compatibility map entries related to proximity targeting.
  2. RMF entry C.21 actually refers to two different types of distance targeting:
Cheers,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages