Hi, I've been researching this for a few hours now and still can't figure
out a solution.
I intend to exclude some content_labels on the campaign level.
At first, I followed the API examples but those are for
'CustomerNegativeCriteria' that are account level settings (sidenote, I
couldn't find these global settings on the AdWords interface).
Then I read more and tried to exclude them using a CampaignCriterion
So I'll create my ContentLabel objects in this way:
$criterion = new ContentLabel();
$criterion->setContentLabelType($sLabelType);
$criterion->setType(CriterionType::CONTENT_LABEL);
Then, I will add that modifier to a CampaignCriterion object:
foreach ($aModifiers as $modifier) {
$campaignCriterion = new CampaignCriterion($sCampaignId, $isNegative,
$modifier, $bidModifier);
$operation = new CampaignCriterionOperation();
$operation->setOperand($campaignCriterion);
$operation->setOperator($operator);
$operations[] = $operation;
}
And then I'll pass those operations to a CampaignCriterionService
$oCampaignCriterionService = $this->getCampaignCriterionService();
return $oCampaignCriterionService->mutate($operations);
All this is generating this error but I can't find how to solve this.
because in the campaign created those values are still in Green (active)
Message: [
CriterionError.CANNOT_TARGET_CRITERION @
operations[0].operand.criterion.contentLabelType;
trigger:'DP',
CriterionError.CANNOT_TARGET_CRITERION @
operations[1].operand.criterion.contentLabelType;
trigger:'ADULTISH',
CriterionError.CANNOT_TARGET_CRITERION @
operations[2].operand.criterion.contentLabelType;
trigger:'JACKASS',
CriterionError.CANNOT_TARGET_CRITERION @
operations[3].operand.criterion.contentLabelType;
trigger:'PROFANITY',
CriterionError.CANNOT_TARGET_CRITERION @
operations[4].operand.criterion.contentLabelType;
trigger:'TRAGEDY',
CriterionError.CANNOT_TARGET_CRITERION @
operations[5].operand.criterion.contentLabelType;
trigger:'VIDEO_RATING_DV_MA'
]
I'm following the tree structure from here but to no avail:
https://developers.google.com/adwords/api/docs/reference/v201710/CampaignCriterionService.ContentLabel?hl=th
Any idea of what I could be doing wrong?
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
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/fc7449f2-a3c5-4d4e-aeb5-826dd29c25e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.