RE: Unable to add user interest to a display type campaign's adgroup

2019-02-13 Thread googleadsapi-forumadvisor via AdWords API and Google Ads API Forum


Hi,

I'm glad it works on your end. The guide
  
only

mentioned that the id
  
(criterion

ID) is required for SET or REMOVED operations. However in your case, since
you are only targeting the UserInterest for the first time, the ADD
operator should be used and the userInterestId is the required field.

Regards,
Luis
AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 02/13/19 16:23:01 msi.saur...@gmail.com wrote:

Yes thanks it worked, but its says it only supports SET, REMOVE operations
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupCriterionService.CriterionUserInterest


On Wednesday, February 13, 2019 at 1:25:21 PM UTC+6,
googleadsapi-forumadvisor wrote:

Hi,

Could you try to use the ADD operator instead and only set the
userInterestId
  
to  
92911.

Let me know if it works.

Thanks and regards,
Luis
AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a
short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey


Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
On 02/13/19 14:08:23 msi.s...@gmail.com wrote:

The other code was wrong
if i set as userInteresetId says id required, if i set as id says invalid id


$adGroupCriterionService = $this->adWordServices->get($this->session,  
AdGroupCriterionService::class);

$operations  = [];

$userInterest = new CriterionUserInterest();
$userInterest->setUserInterestId(92911);
$genderBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
$genderBiddableAdGroupCriterion->setAdGroupId($adGroup->getId());
$genderBiddableAdGroupCriterion->setCriterion($userInterest);

$adgroupOperation = new AdGroupCriterionOperation();
$adgroupOperation->setOperator(Operator::SET);
$adgroupOperation->setOperand($genderBiddableAdGroupCriterion);
$operations[] = $adgroupOperation;

$result = false;
if (!empty($operations)) {
$result = $adGroupCriterionService->mutate($operations);
}

return $result;


On Wednesday, February 13, 2019 at 11:52:37 AM UTC+6, MSI Saurovh wrote:

Hi,
https://developers.google.com/adwords/api/docs/appendix/codes-formats
here you will find all affinity user interest, and

92911 : /Technology/Social Media Enthusiasts is valid affinity

$adGroupCriterionService = $this->adWordServices->get($this->session,  
AdGroupCriterionService::class);

$operations  = [];

$userInterest = new CriterionUserInterest(92911);
$userInterest->setUserInterestId($userInterest->getId());
$genderBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
$genderBiddableAdGroupCriterion->setCriterion($userInterest);

$adgroupOperation = new AdGroupCriterionOperation();
$adgroupOperation->setOperator(Operator::SET);
$adgroupOperation->setOperand($genderBiddableAdGroupCriterion);
$operations[] = $adgroupOperation;

$result = false;
if (!empty($operations)) {
$result = $adGroupCriterionService->mutate($operations);
}

return $result;

but this shows invalid_id error, please help me out here

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 

Re: Unable to add user interest to a display type campaign's adgroup

2019-02-13 Thread MSI Saurovh
Yes thanks it worked, but its says it only supports SET, REMOVE operations
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupCriterionService.CriterionUserInterest


On Wednesday, February 13, 2019 at 1:25:21 PM UTC+6, 
googleadsapi-forumadvisor wrote:
>
> Hi,
>
> Could you try to use the ADD operator instead and only set the 
> userInterestId 
> 
>  to 92911. 
> Let me know if it works.
>
> Thanks and regards,
> Luis
> AdWords API Team
>
>
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion group:
> http://googleadsdeveloper.blogspot.com/search/label/adwords_api
> https://developers.google.com/adwords/api/community/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
> Was your question answered? Please rate your experience with us by taking 
> a short survey.
> If not -- reply to this email and tell us what else we can do to help.
>
> Take Survey 
> 
>
> Also find us on our blog and discussion group:
> http://googleadsdeveloper.blogspot.com/search/label/adwords_api
> https://developers.google.com/adwords/api/community/
> On 02/13/19 14:08:23 msi.s...@gmail.com  wrote:
>
> The other code was wrong
> if i set as userInteresetId says id required, if i set as id says invalid id
>
>
> $adGroupCriterionService = $this->adWordServices->get($this->session, 
> AdGroupCriterionService::class);
> $operations  = [];
>
> $userInterest = new CriterionUserInterest();
> $userInterest->setUserInterestId(92911);
> $genderBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
> $genderBiddableAdGroupCriterion->setAdGroupId($adGroup->getId());
> $genderBiddableAdGroupCriterion->setCriterion($userInterest);
>
> $adgroupOperation = new AdGroupCriterionOperation();
> $adgroupOperation->setOperator(Operator::SET);
> $adgroupOperation->setOperand($genderBiddableAdGroupCriterion);
> $operations[] = $adgroupOperation;
>
> $result = false;
> if (!empty($operations)) {
> $result = $adGroupCriterionService->mutate($operations);
> }
>
> return $result;
>
>
> On Wednesday, February 13, 2019 at 11:52:37 AM UTC+6, MSI Saurovh wrote:
>
> Hi,
> https://developers.google.com/adwords/api/docs/appendix/codes-formats
> here you will find all affinity user interest, and 
>
> 92911 : /Technology/Social Media Enthusiasts is valid affinity
>
> $adGroupCriterionService = $this->adWordServices->get($this->session, 
> AdGroupCriterionService::class);
> $operations  = [];
>
> $userInterest = new CriterionUserInterest(92911);
> $userInterest->setUserInterestId($userInterest->getId());
> $genderBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
> $genderBiddableAdGroupCriterion->setCriterion($userInterest);
>
> $adgroupOperation = new AdGroupCriterionOperation();
> $adgroupOperation->setOperator(Operator::SET);
> $adgroupOperation->setOperand($genderBiddableAdGroupCriterion);
> $operations[] = $adgroupOperation;
>
> $result = false;
> if (!empty($operations)) {
> $result = $adGroupCriterionService->mutate($operations);
> }
>
> return $result;
>
> but this shows invalid_id error, please help me out here
>
> -- 
> -- 
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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.
> Visit this group at https://groups.google.com/group/adwords-api.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/adwords-api/564366b6-57d6-4a83-a074-58e720eeb7a9%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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, 

RE: Unable to add user interest to a display type campaign's adgroup

2019-02-12 Thread googleadsapi-forumadvisor via AdWords API and Google Ads API Forum


Hi,

Could you try to use the ADD operator instead and only set the
userInterestId
  
to  
92911.

Let me know if it works.

Thanks and regards,
Luis
AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 02/13/19 14:08:23 msi.saur...@gmail.com wrote:

The other code was wrong
if i set as userInteresetId says id required, if i set as id says invalid id


$adGroupCriterionService = $this->adWordServices->get($this->session,  
AdGroupCriterionService::class);

$operations  = [];

$userInterest = new CriterionUserInterest();
$userInterest->setUserInterestId(92911);
$genderBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
$genderBiddableAdGroupCriterion->setAdGroupId($adGroup->getId());
$genderBiddableAdGroupCriterion->setCriterion($userInterest);

$adgroupOperation = new AdGroupCriterionOperation();
$adgroupOperation->setOperator(Operator::SET);
$adgroupOperation->setOperand($genderBiddableAdGroupCriterion);
$operations[] = $adgroupOperation;

$result = false;
if (!empty($operations)) {
$result = $adGroupCriterionService->mutate($operations);
}

return $result;


On Wednesday, February 13, 2019 at 11:52:37 AM UTC+6, MSI Saurovh wrote:

Hi,
https://developers.google.com/adwords/api/docs/appendix/codes-formats
here you will find all affinity user interest, and

92911 : /Technology/Social Media Enthusiasts is valid affinity

$adGroupCriterionService = $this->adWordServices->get($this->session,  
AdGroupCriterionService::class);

$operations  = [];

$userInterest = new CriterionUserInterest(92911);
$userInterest->setUserInterestId($userInterest->getId());
$genderBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
$genderBiddableAdGroupCriterion->setCriterion($userInterest);

$adgroupOperation = new AdGroupCriterionOperation();
$adgroupOperation->setOperator(Operator::SET);
$adgroupOperation->setOperand($genderBiddableAdGroupCriterion);
$operations[] = $adgroupOperation;

$result = false;
if (!empty($operations)) {
$result = $adGroupCriterionService->mutate($operations);
}

return $result;

but this shows invalid_id error, please help me out here

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/564366b6-57d6-4a83-a074-58e720eeb7a9%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/00d12hgcog010aijto000d4jtox6gmj2e9n60o30c1g68qj8d1j%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unable to add user interest to a display type campaign's adgroup

2019-02-12 Thread MSI Saurovh


The other code was wrong
if i set as userInteresetId says id required, if i set as id says invalid id


$adGroupCriterionService = $this->adWordServices->get($this->session, 
AdGroupCriterionService::class);
$operations  = [];

$userInterest = new CriterionUserInterest();
$userInterest->setUserInterestId(92911);
$genderBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
$genderBiddableAdGroupCriterion->setAdGroupId($adGroup->getId());
$genderBiddableAdGroupCriterion->setCriterion($userInterest);

$adgroupOperation = new AdGroupCriterionOperation();
$adgroupOperation->setOperator(Operator::SET);
$adgroupOperation->setOperand($genderBiddableAdGroupCriterion);
$operations[] = $adgroupOperation;

$result = false;
if (!empty($operations)) {
$result = $adGroupCriterionService->mutate($operations);
}

return $result;


On Wednesday, February 13, 2019 at 11:52:37 AM UTC+6, MSI Saurovh wrote:
>
> Hi,
> https://developers.google.com/adwords/api/docs/appendix/codes-formats
> here you will find all affinity user interest, and 
>
> 92911 : /Technology/Social Media Enthusiasts is valid affinity
>
> $adGroupCriterionService = $this->adWordServices->get($this->session, 
> AdGroupCriterionService::class);
> $operations  = [];
>
> $userInterest = new CriterionUserInterest(92911);
> $userInterest->setUserInterestId($userInterest->getId());
> $genderBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
> $genderBiddableAdGroupCriterion->setCriterion($userInterest);
>
> $adgroupOperation = new AdGroupCriterionOperation();
> $adgroupOperation->setOperator(Operator::SET);
> $adgroupOperation->setOperand($genderBiddableAdGroupCriterion);
> $operations[] = $adgroupOperation;
>
> $result = false;
> if (!empty($operations)) {
> $result = $adGroupCriterionService->mutate($operations);
> }
>
> return $result;
>
> but this shows invalid_id error, please help me out here
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/564366b6-57d6-4a83-a074-58e720eeb7a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.