Issue in Google Ads Campaign Setting "Content Exclusions" for "Sensitive social issues":

Visto 191 veces
Saltar al primer mensaje no leído

pra...@wollmilchsau.de

no leída,
15 dic 2017, 4:15:2915/12/17
a AdWords API Forum
I am creating a Google Ads campaign via API version v201710, and the campaign is creating fine. But, if I try to SET the Content Exclusion to "Sensitive social issues" by Google Ad SDK, it's not working.

I tried to debug the issue and found that the this field ("Sensitive social issues") has constant value as "UNKNOWN" in ContentLabelType. It's nowhere written like that in the documentation. Docs: https://developers.google.com/adwords/api/docs/reference/v201708/CampaignCriterionService.ContentLabelType

To find out about this, first I setup a campaign's Content Exclusion as "Sensitive social issues" via Google Adwords dashboard (e.g.: https://www.screencast.com/t/hi7rLnTa )
Then, I tried to retrieve the targeting values of this Campaign by Google Ads SDK (API), and I got "UNKNOWN" as ContentLabelType value for "Sensitive social issues".

The bigger problem is that UNKNOWN value is read-only, it can't be set. It's written in Google's documentation, and WSDL file too.
Anyways, I tried the same by Google Ad SDK for "Sensitive social issues" in Content Exclusions via API to set it like this: https://www.screencast.com/t/hi7rLnTa.
This is my code for for this, which should not work, and it did not work, because Google does not allow UNKNOWN.

$campaignCriteria = [];
$addContentLabel = array(
 ContentLabelType::TRAGEDY,
 ContentLabelType::UNKNOWN,
 ContentLabelType::PROFANITY,
 ContentLabelType::ADULTISH,
 ContentLabelType::JUVENILE
);
foreach ($addContentLabel as $item){
 $ContentLabelObj = new ContentLabel();
 $ContentLabelObj->setContentLabelType($item);
 $campaignCriteria[] = new NegativeCampaignCriterion($campaignId,"null",$ContentLabelObj);
}

$operations = [];
foreach ($campaignCriteria as $campaignCriterion) {
 $operation = new CampaignCriterionOperation();
 $operation->setOperator(Operator::ADD);
 $operation->setOperand($campaignCriterion);
 $operations[] = $operation;
}

try
{
 $result = $campaignCriterionService->mutate($operations);
 foreach ($result->getValue() as $campaignCriterion) {
     printf(
         "Campaign targeting criterion with ID %d and type '%s' with value '%s' was added.\n",
         $campaignCriterion->getCriterion()->getId(),
         $campaignCriterion->getCriterion()->getType(),
         $campaignCriterion->getCriterion()->getContentLabelType());
 }
}
catch(ApiException $apiException)
{
 print_r($apiException);
 throw new Exception('Error: ' . $apiException->getErrors()[0]->getReason());
}    



My question is what constant value should I use for setting "Content Exclusions" to "Sensitive social issues" in my campaigns via API.
Can anyone please help?

pra...@wollmilchsau.de

no leída,
15 dic 2017, 4:16:3315/12/17
a AdWords API Forum

Bharani Cherukuri (AdWords API Team)

no leída,
15 dic 2017, 11:52:0815/12/17
a AdWords API Forum
Hello, 

That's right, those category fields are not supported through the API at this time. You may refer to this guide for all the supported content exclusions. Please keep an eye out on our blog for any upcoming releases or announcements. 

Regards,
Bharani, AdWords API Team

Pradeep Singh

no leída,
18 dic 2017, 9:34:2018/12/17
a AdWords API Forum
Hello Bharani,

Thank you for your quick reply.

I hope this issue will be fixed in next API version. 

Regards,
Pradeep Singh
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos