RE: setting language parameter in new campaign class

2021-11-16 Thread 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
Hi Filip,

Thank you for providing your own solution.

Oleg, please also note that there is a code example that makes use of the 
CampaignCriterionService to add campaign targeting criteria.

Regards,
Matt
Google Ads API Team


Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 
Google Ads API and AdWords API Annual Survey

Matt
Google Ads API Team
ref:_00D1U1174p._5004Q2R93oS:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/-VkK60R2OGDB00zqSLV7x6RlK3z8OCOX9QmA%40sfdc.net.


Re: setting language parameter in new campaign class

2021-11-16 Thread Filip Pećanac
Hi Oleg,

In PHP I have used the following code to add language(s):

$campaignResourceName = ResourceNames::forCampaign($customerId, 
$campaignId);
$campaignCriterionOperations = [];

$campaignCriterion = new CampaignCriterion([
'campaign' => $campaignResourceName,
'type' => CriterionType::LANGUAGE,
'language' => new LanguageInfo([
'language_constant' => ResourceNames::forLanguageConstant($languageId),
]),
]);

$campaignCriterionOperation = new CampaignCriterionOperation();
$campaignCriterionOperation->setCreate($campaignCriterion);
$campaignCriterionOperations[] = $campaignCriterionOperation;

$campaignCriterionServiceClient = $this->googleAdsClient->
getCampaignCriterionServiceClient();
$campaignCriterionServiceClient->mutateCampaignCriteria(
$customerId,
$campaignCriterionOperations
);

I hope it helps you :)

Regards,
FIlip

On Monday, November 15, 2021 at 11:04:06 AM UTC+1 ol...@disrupt.social 
wrote:

> Hello,
> I want to add the language that I want when i created the new campaign.
> for example
> $campaign = new Campaign([
> 'name' => 'campaign1',
> 'language' => english
> ]);
> I can't see 'language' parameter in campaign class.
>
> Can you help me?
> Regards
> oleg
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/17a2fd33-ebe2-4fb6-823e-2f30d8fd3b73n%40googlegroups.com.


Re: setting language parameter in new campaign class

2021-11-16 Thread Filip Pećanac
Hi Oleg,

In PHP I have used the following code to add language(s):

$campaignResourceName = ResourceNames::forCampaign($customerId, 
$campaignId);
$campaignCriterionOperations = [];

$campaignCriterion = new CampaignCriterion([
'campaign' => $campaignResourceName,
'type' => CriterionType::LANGUAGE,
'language' => new LanguageInfo([
'language_constant' => ResourceNames::forLanguageConstant($languageId),
]),
]);

$campaignCriterionOperation = new CampaignCriterionOperation();
$campaignCriterionOperation->setCreate($campaignCriterion);
$campaignCriterionOperations[] = $campaignCriterionOperation;

$campaignCriterionServiceClient = $this->googleAdsClient->
getCampaignCriterionServiceClient();
$campaignCriterionServiceClient->mutateCampaignCriteria(
$customerId,
$campaignCriterionOperations
);

I hope it helps you :)

Regards,
FIlip
On Monday, November 15, 2021 at 6:26:28 PM UTC+1 adsapi wrote:

> Hi Oleg,
>
> There isn't a way to set the language of a campaign 
>  
> through 
> the CampaignService. However, you can set language as a campaign criterion 
> 
>  
> using the CampaignCriterionService.
>
> Regards,
> Matt
> Google Ads API Team
>
>
> Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 
> 2021 
> Google Ads API and AdWords API Annual Survey 
> 
>   
> [image: Google Logo] 
> Matt 
> Google Ads API Team 
>
>
> ref:_00D1U1174p._5004Q2R93oS:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/acf96fac-b18f-41c4-8c47-edfc65cb3c16n%40googlegroups.com.


RE: setting language parameter in new campaign class

2021-11-15 Thread 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
Hi Oleg,

There isn't a way to set the language of a campaign through the 
CampaignService. However, you can set language as a campaign criterion using 
the CampaignCriterionService.

Regards,
Matt
Google Ads API Team


Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 
Google Ads API and AdWords API Annual Survey

Matt
Google Ads API Team
ref:_00D1U1174p._5004Q2R93oS:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/mCe9H0R2MJ3Q00k5xWixeER7uf9ayeQvLoWw%40sfdc.net.


setting language parameter in new campaign class

2021-11-15 Thread Oleg Disrupt
Hello,
I want to add the language that I want when i created the new campaign.
for example
$campaign = new Campaign([
'name' => 'campaign1',
'language' => english
]);
I can't see 'language' parameter in campaign class.

Can you help me?
Regards
oleg

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/df0913fb-4a64-415b-9496-6552764fc194n%40googlegroups.com.