CampaignCriterionService for all location

65 views
Skip to first unread message

Satendra Maurya

unread,
Mar 9, 2016, 6:06:45 AM3/9/16
to AdWords API Forum
Hi,

how to target our campaign for all location
$place = new \Location();
$place->id = $locationId;
$campaignCriteria[] = new \CampaignCriterion($result->value[0]->id, null, $place);

what is location Id for all location or how to tagret campaign for all location. 

thanks you

Umesh Dengale

unread,
Mar 9, 2016, 12:50:19 PM3/9/16
to AdWords API Forum
Hello,

When you create a campaign and don't specify any location targeting means that campaign can serve everywhere(all countries and territories).  If you need to target the specific country or area within the country then you could add location criteria. Please check out location targeting guide for more details.

Regards,
Umesh, AdWords API Team.

Satendra Maurya

unread,
Mar 10, 2016, 8:35:26 AM3/10/16
to AdWords API Forum
Hi, 
    if i don't specify language for all languages and location for all countries it through an error : [NotEmptyError.EMPTY_LIST @ operations]
I think $campaignCriteria is not set when we trying to mutate. so that its give error.so how to target campaign for all location and language
    
$campaignCriterionService = $user->GetService('CampaignCriterionService');
 $campaignCriteria = array();
  
   $operations = array();

 foreach ($campaignCriteria as $campaignCriterion) {
            $operations[] = new \CampaignCriterionOperation($campaignCriterion, 'ADD');
        }

        $results = $campaignCriterionService->mutate($operations);

please help me .
thank you

Umesh Dengale

unread,
Mar 10, 2016, 1:47:08 PM3/10/16
to AdWords API Forum
Hello,

When you create a campaign and don't specify any location targeting means that campaign can serve everywhere(all countries and territories). Language targeting allows you to choose the language of the sites that you'd like your ads to appear on. Targeting all languages isn’t always the best approach. Please read the How language targeting works document for more details. If you still have any issues while adding criteria then provide SOAP XML request and response logs? Just click Reply privately to author in the forum when responding.

Thanks,
Umesh, AdWords API Team. 
Reply all
Reply to author
Forward
0 new messages