including Locations when creating a campaign via REST

74 views
Skip to first unread message

Dev Dev

unread,
May 3, 2022, 10:12:19 AM5/3/22
to Google Ads API and AdWords API Forum
Hola,
How can I include locations in a new project that I create via REST?
Specifically DMAs

Google Ads API Forum Advisor

unread,
May 4, 2022, 8:48:32 AM5/4/22
to adwor...@googlegroups.com
Hello,

Thanks for reaching out. You can target locations while creating campaigns by using customers.campaignCriteria.mutate. You can specify 'location' as the CampaignCriterion in your request.

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2aPz3F:ref

Matan Peleg

unread,
May 10, 2022, 9:13:51 AM5/10/22
to Google Ads API and AdWords API Forum
thanks for your reply.

Is it done via the geoTargetConstant? 
I need to add locations by DMA value. does every DMA have criterion_id? if so, how do know what that id is?
can I add multiple DMAs as an array?

Matan Peleg

unread,
May 10, 2022, 12:09:56 PM5/10/22
to Google Ads API and AdWords API Forum

Google Ads API Forum Advisor

unread,
May 11, 2022, 12:49:35 PM5/11/22
to adwor...@googlegroups.com
Hi Matan,

The  geo_target_constant report lists DMA Regions, while we don't have a CSV file of DMA regions

Here's a sample REST DMA location criteria creation as an array of operations, I just used this in my test account:
curl -i --request POST https://googleads.googleapis.com/v10/customers/<OPERATING_CUSTOMER_PLACEHOLDER>/campaignCriteria:mutate \
--header "Content-Type: application/json" \
--header "login-customer-id: <LOGIN_CUSTOMER_ID_PLACEHOLDER>" \
--header "developer-token: <DEVELOPER_TOKEN_PLACEHOLDER>" \
--header "Authorization: Bearer <ACCESS_TOKEN_PLACEHOLDER>" \

--data '{
    "operations": [
          { 
                    "create": {
"campaign": "customers/<OPERATING_CUSTOMER_PLACEHOLDER>/campaigns/16252085032",
"location": {
                "geoTargetConstant": "geoTargetConstants/200501",
          },
           },
},
 {
          "create": {
"campaign": "customers/<OPERATING_CUSTOMER_PLACEHOLDER>/campaigns/16252085032",
"location": {
                "geoTargetConstant":"geoTargetConstants/200531",
          },
           },
},

    ],
"responseContentType": "MUTABLE_RESOURCE"
}
'


ref:_00D1U1174p._5004Q2aPz3F:ref

Google Ads API Forum Advisor

unread,
May 11, 2022, 12:50:21 PM5/11/22
to adwor...@googlegroups.com


Regards,


Google Logo
Aryeh
Google Ads API Team
 


ref:_00D1U1174p._5004Q2aPz3F:ref
Reply all
Reply to author
Forward
0 new messages